0% found this document useful (0 votes)
8 views

java program assignment

The document outlines a Java lab assignment consisting of 40 tasks, ranging from basic programming concepts such as displaying a welcome message and checking for prime numbers, to more advanced topics like exception handling, threading, and JDBC database interaction. Each task is designed to enhance the understanding of Java programming through practical implementation. The assignments cover a wide array of topics including recursion, arrays, classes, and GUI components.

Uploaded by

pexav44956
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

java program assignment

The document outlines a Java lab assignment consisting of 40 tasks, ranging from basic programming concepts such as displaying a welcome message and checking for prime numbers, to more advanced topics like exception handling, threading, and JDBC database interaction. Each task is designed to enhance the understanding of Java programming through practical implementation. The assignments cover a wide array of topics including recursion, arrays, classes, and GUI components.

Uploaded by

pexav44956
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

JAVA LAB ASSIGNMENT

1. Write a Java program to display Welcome message.


2. Write a Java program to demonstrate Command line arguments
3. Write a java program to check Armstrong Number.
4. Write a java program to check prime number.
5. Write a java program to Display Prime Numbers between Intervals.
6. Write a java program to Find LCM of two Numbers.
7. Write a java program to print factorial of a given number using recursion.
8. Write a java program to find the GCD of two given number using recursion.
9. A program to illustrate the concept of class with Constructor overloading
10. Write a Java program to demonstrate Scanner (I/O Streams)
11. Write a Java program to demonstrate Arrays.
12. Write a java program which takes 10 numbers from user in an array and print the smallest
number, greatest number and average of array.
13. Write a program in Java to find the sum of the given series:
S = a2 + a2 / 2 + a2 / 3 + …… + a2 / 10
14. Write a program to input a number and display the new number after reversing the digits
of the original number. The program also displays the absolute difference between the
original number and the reversed number.
15. Write a java program to create a simple calculator using switch case.

16. Write a java program to find the frequency of vowel in a given string.
17. Write a java program to sort given strings in lexicographical order.
18. Write a java program to find the multiplication of two given matrix.
19. Write a Java program that prints all real solutions to the quadratic equation ax2 + bx + c
= 0. Read in a, b, c and use the quadratic formula. If the discriminant b2 -4ac is negative,
display a message stating that there are no real solutions.
20. Write a Java program that uses both recursive and non recursive functions to print the nth
value in the Fibonacci sequence.

21. Write a program to input a number. Check and display whether it is a Niven number or
not. (A number is said to be Niven which is divisible by the sum of its digits).
Example: Sample Input 126
Sum of its digits = 1 + 2 + 6 = 9 and 126 is divisible by 9.
22. Write a Java program that checks whether a given string is palindrome or not.
23. Write a Java program to sort a list of names in ascending order
24. A program to illustrate the concept of class with Method overloading
25. A program to illustrate the concept of Dynamic Polymorphism
26. A program to illustrate the concept of Single inheritance
27. A program to illustrate the concept of Multi level inheritance
28. A program to illustrate user defined packages
29. A program to illustrate the concept of Abstract Classes
30. A program using Interfaces.
31. Write a java program to convert primitive data type into object.
32. Write a Java program to implement the concept of exception handling
33. A program to illustrate the concept of threading using Thread Class
34. A program to illustrate the concept of threading using runnable Interface
35. Develop an applet that displays a simple message
36. Develop an applet that displays lines, rectangles, ovals, square etc
37. Write a Java program to illustrate GUI Components using AWT.
38. Write a Java program to change a specific character in a file
39. Write a Java program that correctly implements producer consumer problem using the
concept of inter thread communication.
40. Write a JDBC program to display the data from a given database..

You might also like