Advanced Java Programming - Project
Work (Q&A Based)
Unit 1: Programming in Java
1. Q1. Explain the architecture and features of Java with examples.
Answer: Java is an object-oriented, platform-independent language... [Detailed explanation
+ example code].
2. Q2. What are threads in Java? Explain multithreading with an example program.
Answer: A thread is a lightweight process... Example: class MyThread extends Thread {...}.
Unit 2: User Interface Components with Swing
3. Q1. Differentiate between AWT and Swing with examples.
Answer: AWT is heavyweight while Swing is lightweight... Example code with JFrame,
JButton etc.
4. Q2. Explain different layout managers with sample code.
Answer: FlowLayout, BorderLayout, GridLayout, etc. Example code given...
Unit 3: Event Handling
5. Q1. Explain the event delegation model in Java.
Answer: Event delegation separates event source and listener... Example with
ActionListener.
6. Q2. Write a program to demonstrate handling of ActionEvent and MouseEvent.
Answer: [Program explanation with JButton and mouse click handling].
Unit 4: GUI with JavaFX
7. Q1. Differentiate between JavaFX and Swing.
Answer: JavaFX is modern with scene graph and CSS support... Example of JavaFX program.
8. Q2. Explain JavaFX layout managers with example.
Answer: FlowPane, BorderPane, GridPane etc... Example code included.
Unit 5: Java Database Connectivity (JDBC)
9. Q1. Explain JDBC architecture and driver types.
Answer: JDBC has 4 driver types... architecture explained with diagram.
10. Q2. Write a program to insert data using PreparedStatement.
Answer: Example with Connection, PreparedStatement and SQL insert.
Unit 6: Network Programming
11. Q1. Differentiate between TCP and UDP.
Answer: TCP is connection-oriented, UDP is connectionless... detailed explanation.
12. Q2. Write a socket program in Java using TCP.
Answer: Example ServerSocket, Socket, DataInputStream, DataOutputStream.
Unit 7: Servlets and JSP
13. Q1. Explain servlet lifecycle with diagram.
Answer: init(), service(), destroy() methods... lifecycle explained.
14. Q2. What are JSP implicit objects? Explain with example.
Answer: request, response, session, out, application etc... Example JSP code.
Unit 8: RMI and CORBA
15. Q1. Explain RMI architecture and its steps.
Answer: RMI allows remote object invocation... architecture + steps.
16. Q2. Differentiate between RMI and CORBA.
Answer: RMI is Java-based, CORBA is language-independent... comparison in detail.