Java Lab Questions
Java Lab Questions
Method overriding
-using super
-using dynamic method dispatch
3.Exception handling
9. Predefined Exceptions handling
Examples to illustrate ArrayIndexOutOf Bound Exeption
NumberFormatException, NullPointerExeption
10. Custom Exception
CheckedException
UncheckedException
4.Streams
11. Prog for
• Reading input from a file and displaying it in the console
• Reading input from two files and storing it in a third file
• Read the input from the program itself and write to the file
• Getting input from user and storing it in an array and write into a file
• Concatenation of files
• Appending information to files
• Word Count, Line count. Counting the occurrence of a particular string
• Usage of File properties-exists,delete,available,etc
5. Threads
Producer Consumer problem
12. -Generating numbers
13. -Generating characters
6. Applets
14. -Event handling in buttons and checkbox.
7. TCP/IP Socket
15. -msg communication from server to client.
8. UDP communication
16. -msg communication from server to client.
17. -msg communication from client to server.
9. JDBC
10. Servlets
18. -processing a HTML form
11. RMI
19. interface programs(sub division 2 in core java programs)
Sample Questions
1. a. Write a java program to perform the arithmetic operations using the concept of
method overloading
Design the HTML page for a job site which contains a form for filling a biodata
of a person and it should contain a menu of various train lists
2. Write a RMI program to perform arithmetic operations. Based upon the user
3. Write a java program to find the roots of a quadratic equation using interface and
packages.
6. a. Write a TCP/IP Socket program to send the contents of a file from server to
client.
b. Design a HTML page for railways which contains link for a reservation and
7. Write a java program to perform the following operations based upon the choice
10. a. Write a java program to solve producer consumer problem which generates
b. Design a HTML page which contains information of a library using tables with
its attributes, a form for issuing a book to students and use various type of lists to
11. Develop a web page which contains information regarding job opportunities using
Get the biodata of the user as an input using various form fields (the form must
have all the controls) and on submission of the form, a servlet is invoked to
12. a. Write a java program to calculate the area of 3 geometric objects operations