Advanced Java programming (Theory)
UNIT I
Event Handling: Event, Event Source, Event Classes, Event Listener interface, Examples,
Handling Windows Events, Adapter Classes, Inner classes.
1. Explain the Java Event Delegation Model with suitable diagram and Example.
2. Explain Event, Event Source, and Event Listener with an example code.
3. What is Event Handling? Explain the steps involved in event handling in Java with a
detailed example.
4. Explain different Event Classes in Java (ActionEvent, MouseEvent, KeyEvent, ItemEvent).
5. What is an event listener? Explain different types of event listener interfaces with
examples:
6. Describe Adapter Classes in detail. With Suitable Example.
7. Explain how inner classes help in event handling with an example.
UNIT II
Swing: Introduction to JFC (Java Foundation Classes), Swing, Swing Features, JComponent,
JApplet, JFrame, JPannel, JTextField, JButtons, JCheckBox and JRadioButton, JComboBox,
JScrollPane, JList.
1) Define Swing. How is it different from AWT?
2) Explain the hierarchy of Swing classes starting from Component → JComponent →
Swing components
3) Describe various Swing containers:
a) JFrame
b) JWindow
c) JPanel
d) JApplet
4) Explain the role of JComponent. List any five commonly used Swing components and
Explain with example.
5) Differentiate between the following:
a) AWT vs Swing
b) JCheckBox vs JRadioButton
c) JFrame vs JPanel
6) Program to create a JFrame with JButton and JTextField.
7) Program using JCheckBox and JRadioButton (with ItemListener).
UNIT III
JDBC Architecture: Introduction to JDBC, Java and JDBC, JDBC VS ODBC, JDBC DRIVER
MODEL, JDBC Driver Types, Types of Driver Managers, JDBC Connection process, Statement
object, preparedStatement object, operations on Resultset (Read, insert, update and delete),
transaction processing, Metadata, Resultset Metadata, Data types.
1) What is JDBC? Why is it used?
2) What is the difference between JDBC and ODBC? Compare JDBC and ODBC
3) Explain JDBC and JDBC architecture
4) Explain the types of JDBC drivers with examples
5) What is JDBC? Why is it used? Explain the steps involved in JDBC connection process
6) Write a program to perform CRUD operations (insert, update, delete, select) on a
database table using JDBC.
7) Explain the following with examples:
a) Statement
b) PreparedStatement
c) CallableStatement
d) ResultSetMetaData
8) Explain DatabaseMetaData and ResultSetMetaData in detail. Give example programs.
UNIT IV
Introduction to JSP and Its Lifecycle, JSP Directives: page, include, taglib, JSP Scripting
Elements: Declarations, Scriptlets, Expressions, JSP Implicit Objects: request, response, session,
application, out, config, JSP Standard Actions: jsp:include, jsp:forward, jsp:useBean, JSP with
JDBC for Database Connectivity.
1) What is JSP? How is it different from Servlet?
2) What is JSP? Explain the lifecycle of JSP with a neat diagram.
3) List and Explain JSP directives (page, include, taglib) with syntax and examples.
4) Explain JSP scripting elements in detail with example program.
5) Discuss all implicit objects in JSP with suitable examples:
6) Explain JSP with JDBC connection steps. Write a JSP program to connect to a database using
JDBC and display records.
7) Explain JSP Standard Actions in detail with example code.
8) Explain JavaBeans components in JSP. Write a JSP program using jsp:useBean,
jsp:setProperty, and jsp:getProperty.
UNIT V
Networking Basics, InetAddress, TCP/IP Client-Server Socket, URL Connection, HTTPURL
Connection, Datagram, Introduction To EJB, Types of EJB.
1. What is networking in Java? Explain the role of InetAddress class
2. Explain TCP/IP client-server communication with example.
3. Explain TCP/IP Client-Server Socket Programming in Java. Write a complete program
for both client and server.
4. Explain Java networking classes in detail:
a) InetAddress
b) Socket
c) ServerSocket
d) URL
e) URLConnection
f) HttpURLConnection
5. Describe UDP communication using DatagramSocket and DatagramPacket with program for
sender and receiver.
6. Explain EJB in detail:
a) What is EJB
b) EJB architecture
c) Types of EJB
d) Advantages of EJB
7. Differentiate between:
a) TCP vs UDP
b) Socket vs ServerSocket
c) URLConnection vs HttpURLConnection
d) Stateful vs Stateless beans