Advanced Java Programming - Viva Questions (Diploma 3rd Year)
Core Concepts
- What is the difference between Core Java and Advanced Java?
- What is a Servlet? How does it work?
- What is the lifecycle of a Servlet?
- What is the difference between GET and POST methods?
- What is a JSP (JavaServer Page)? How is it different from a servlet?
- What are implicit objects in JSP?
- What is the difference between forward() and sendRedirect()?
- What is a Session? How is it maintained?
- What is the difference between Session, Cookie, and Application Context?
Database (JDBC)
- What is JDBC?
- Explain the steps to connect Java with MySQL using JDBC.
- What are drivers in JDBC?
- What is the difference between Statement and PreparedStatement?
- What are the types of JDBC drivers?
Advanced Java Programming - Viva Questions (Diploma 3rd Year)
- What is ResultSet?
Networking
- What is socket programming?
- What is the difference between TCP and UDP in Java networking?
- What is a ServerSocket?
Multithreading
- What is a Thread? How do you create a thread in Java?
- What is the difference between Runnable and Thread class?
JavaBeans & MVC
- What is a JavaBean?
- What is the MVC architecture in Java?
- What are the components of MVC?
Practical / Coding-based
- Write code to connect to a MySQL database and fetch records.
- Write a servlet that accepts a user name and password and displays them on another page.
- Write a JSP program to take user input and display it.
- Write a program to implement simple login using session tracking.