aProgram-aDay

Programming is an art and skill that can be calibrated by learning the different ways to apply logic to a solution. This blog helps the beginner level programmers and computer science graduates to acquire programming skill easily by learning a program a day. They can also try to rewrite the same program in a more efficient way. This will boost up their programming knowledge.

Pages

  • Home
  • Coding Tips
  • Shell Scripts
  • Java Programs
  • MCQs
  • Study Notes

Java Programs

Write a Java program to print first 'n' prime numbers where the input 'n' is given as a command line argument.


Write a Java program to overload sum method to implement method overloading.

Write a Java program to handle divide by zero exception using a try-catch block.

Write a Java program to find the average of n numbers given as input in the command line.

Write a Java program to find the maximum in an array of integers.

Write a Java program to find the power(m, n) using a user-defined function.

Write a Java program to create a class called Student and include methods to getData, process results and display details. The instance variables are name, regno, cia1, cia2, assg, quiz, ext_mark and result. To process result, check whether the ext_mark >= 20 and then check whether int_mark + ext_mark >= 40; if this is true then set the result as PASS else result as FAIL. Calculate the internal marks from cia1, cia2, assg, and quiz as it is done in our college.


Write a Java program to create two threads: one thread to display odd numbers between 0 to 10 and another thread to display even numbers between 0 to 10. Create threads by implementing the Runnable interface.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Home
Subscribe to: Posts (Atom)
  • Reverse String Till Underscore
  • Expand Alphabets
  • Shell script to perform linear search in an array

Job at Accenture

Track-2_System and Application Services Associate_2023 & 2024

Click Here


New Jobs Posted

  • Jobs at Amazon
  • Infor - Software developer
  • Zoho - Software Developer
  • Zoho - Web Developer
  • CitiGroup - Ops Sup Analyst
  • TCS NQT - For 2024 Pass-outs
  • Cognizant - Data Process Executive
  • Data Engineer - KPMG
  • Accenture - Engineering 2024/2023 Passouts

Free courses online

Free Harvard courses

𝐒𝐭𝐚𝐭𝐢𝐬𝐭𝐢𝐜𝐬 𝐚𝐧𝐝 𝐑


𝐃𝐚𝐭𝐚 𝐒𝐜𝐢𝐞𝐧𝐜𝐞: 𝐌𝐚𝐜𝐡𝐢𝐧𝐞 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠v


TCS Smart Drive 2023

To Apply Click Here



Search This Blog

Blog Archive

  • ▼  2024 (5)
    • ▼  December (1)
      • Student dtd
    • ►  April (3)
    • ►  February (1)
  • ►  2023 (13)
    • ►  October (1)
    • ►  August (2)
    • ►  May (2)
    • ►  April (8)
  • ►  2022 (2)
    • ►  November (1)
    • ►  April (1)
  • ►  2021 (13)
    • ►  November (1)
    • ►  October (1)
    • ►  August (1)
    • ►  June (8)
    • ►  April (1)
    • ►  February (1)
  • ►  2020 (19)
    • ►  October (1)
    • ►  September (4)
    • ►  August (1)
    • ►  July (7)
    • ►  May (3)
    • ►  March (3)
  • ►  2019 (20)
    • ►  April (6)
    • ►  March (1)
    • ►  February (7)
    • ►  January (6)
  • ►  2018 (38)
    • ►  October (2)
    • ►  July (2)
    • ►  June (2)
    • ►  April (15)
    • ►  March (17)
  • ►  2017 (17)
    • ►  March (3)
    • ►  February (4)
    • ►  January (10)
  • ►  2016 (9)
    • ►  December (9)

Job at TCS

TCS Smart Hiring Drive Qualification: Full-time Graduates from BCA/ B.Sc (Computer Science, IT, Statistics, Chemistry, Electronics, Biochem, and Maths) and B.Voc in CS or IT Year Of Passing: Any batch upto 2024 To apply : Click Here

Featured post

Student dtd

<!ELEMENT courses (student)+>  <!ELEMENT student (name,regno)> <!ATTLIST student class (UG|PG) FIXED "UG"> <!...

Pages

  • Home
  • Privacy Policy

About Me

Safish
View my complete profile

Followers

Powered by Blogger.