Tuesday, 2 August 2016

All Programs for Java Lab Exam

1.       Write a java program to create an applet  of the following format to demonstrate the drawing of line

2.       Write a java program to demonstrate the keyword final to data, methods, classes  and interfaces, justify what makes the difference.

3.       Write a program to demonstrate the use of notify(), notifyAll(), join(), wait() methods in threads.



1.       Write a java program to create an applet  of the following format to draw different shapes

2.       Write a program to create two different threads. One thread should print even numbers and the other thread should print odd numbers below 100.

3.       Write a program to demonstrate the user defined exception.  This exception is raised whenever user do not enter valid dimensions for matrix multiplication.




4.       Write a java program to create an applet  of the following format to draw Pie Chart

5.       Write a program to create synchronized block which is accessed by two different threads. (eg: print  [ [ [ [ [ [ ] ] ] ] ] ]  )

6.       Write a program to demonstrate the use of try, catch, throw, throws, finally keywords in exception handling.


7.       Write a java program to create an applet  of the following format to draw a cube

8.       Write a Java program that creates three threads. First thread displays “Good Morning” every one second, the second thread displays “Hello” every two seconds and the third thread displays “Welcome” every three seconds.

9.       Write a java program to read the contents of a text file and print the contents of the file.

          

10.   Write a java program to create an applet  of the following format to draw person using different shapes

11.   Write a java program to demonstrate the creation and use of user defined package.

12.   Write a program to demonstrate the use of access specifiers.

13.   Write a java program to create an applet  of the following format to draw a ball and change according to the button click

14.   Write a Java program that creates three threads. First thread displays “Good Morning” every one second, the second thread displays “Hello” every two seconds and the third thread displays “Welcome” every three seconds.

15.   Write a java program to demonstrate join() method for a total of three threads.


16.   Write a java program to create an applet  to calculate the car loan emi amount. Consider the compound interest or simple interest

17.   Write a java program to display the lower triangular and upper triangular elements of Square Matrix.  If the dimensions of the matrix is not square, generate a User Defined Exception.

18.   Write a java program  to demonstrate the communication between Client and Server.





19.   Write a java program to create an applet  to print the prime numbers in the given range

20.   Write a java program to create an applet to demonstrate flow, grid, border layout managers.

21.   Write a java program to demonstrate the use of try, catch, throw,  throws and finally keywords.




22.   Write a java program to create an applet  of the following format to chech wether given string is palindrome or not

23.   Write a java program to display the lower triangular and upper triangular elements of Square Matrix.  If the dimensions of the matrix is not square, generate a User Defined Exception.

24.   Write a java program to demonstrate the use of keyword synchronized in multi threaded programming.


25.   Write a program create the following applet.

26.   Write a java program to demonstrate the use of communication between Client and Server.

27.   Write a java program to create an applet to demonstrate the use of operators and operands shows the result after pressing = button.

28.   Write a java program to create the following output.
29.   Create an applet to demonstrate the font class.  Print Hello in atleast 5 fonts with different styles such as Bold, Italic, Underlined in different sizes.

30.   Write a program to demonstrate the use of all wrapper classes for type conversion.

31.   Write a program create the following applet.

32.   Write a java program to demonstrate the use of communication between Client and Server.


33.   Write a program to demonstrate the file handling.  Open a text file print its contents.

No comments:

Post a Comment