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: Comments (Atom)
  • Java Notes
  • PHP Study Material
  • Error handling in PHP

Job at Accenture

System and Application Services Associate_till 2024 passouts

Click Here


New Jobs Posted

  • Associate - Wipro Limited - Any graduate
  • TCS NQT - For 2024 Pass-outs
  • Accenture - Engineering 2024/2023 Passouts
  • Zoho - Software Developer
  • Deloitte - Associate Analyst - Learning Admin - Hyderabad

Free courses online

Introduction to Data Science using R


Free Harvard courses

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


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


TCS Smart Drive

To Apply Click Here



Search This Blog

Blog Archive

  • ▼  2025 (8)
    • ▼  October (7)
      • Exception Handling in PHP
      • Error handling in PHP
      • PHP Study Material
      • SWING COMPONENTS
      • Swings in Java
      • Applets in Java
      • Inner Classes in Java
    • ►  August (1)
  • ►  2024 (5)
    • ►  December (1)
    • ►  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

Exception Handling in PHP

Exception handling is a powerful mechanism in PHP, which is used to handle runtime errors (runtime errors are called exceptions).  The main ...

Pages

  • Home
  • Privacy Policy

About Me

Safish
View my complete profile

Followers

Powered by Blogger.