0% found this document useful (0 votes)
23 views2 pages

Advanced Java Viva Answers

The document outlines key concepts in Advanced Java Programming, covering event handling, Swing GUI toolkit, JDBC for database connectivity, JSP and JavaBeans for dynamic web pages, and networking with EJB components. It highlights the importance of event listeners, the differences between Swing and AWT, and various JDBC driver types. Additionally, it discusses Java's platform independence, garbage collection, and serialization.

Uploaded by

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

Advanced Java Viva Answers

The document outlines key concepts in Advanced Java Programming, covering event handling, Swing GUI toolkit, JDBC for database connectivity, JSP and JavaBeans for dynamic web pages, and networking with EJB components. It highlights the importance of event listeners, the differences between Swing and AWT, and various JDBC driver types. Additionally, it discusses Java's platform independence, garbage collection, and serialization.

Uploaded by

akshay
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Advanced Java Programming – Viva Answers

UNIT I – Event Handling


Event handling is the mechanism to respond to user actions like mouse clicks or key presses.
An event is an object that represents a change in state of a component.
Event source is the component that generates the event.
Event listener is an interface that handles events.
Event Delegation Model transfers event handling to listeners.
EventObject is the superclass of all events.
Adapter classes provide default implementations of listeners.

UNIT II – Swing
Swing is a GUI toolkit for Java.
Swing is platform-independent while AWT is platform-dependent.
JFrame is a main window; JPanel is a container.
JButton is used for clicking actions.
JLabel displays text or image.
Layout manager controls component positioning.

UNIT III – JDBC


JDBC connects Java applications with databases.
JDBC drivers are Type 1, 2, 3, and 4.
DriverManager manages database drivers.
Connection represents database connection.
Statement executes SQL queries.
PreparedStatement is faster and secure.
ResultSet stores query results.

UNIT IV – JSP & JavaBeans


JSP creates dynamic web pages.
Servlet uses Java code; JSP uses HTML with Java.
JSP implicit objects include request, response, session.
JavaBean is a reusable Java class.
jsp:useBean accesses JavaBeans.

UNIT V – Networking & EJB


Networking connects computers to share data.
TCP is reliable; UDP is faster.
Socket is an endpoint for communication.
EJB are server-side components.
Stateful beans maintain state; Stateless do not.

Common Viva
Java is platform-independent due to JVM.
Garbage collection manages memory automatically.
Serialization converts object into byte stream.

You might also like