Java practice question for viva
Java practice question for viva
1. Project Overview
Q: Technologies used?
• MySQL (Database)
3. Database
4. API Integration
Q: What is SSLHelper.java?
A: A helper to bypass SSL validation for easier API access in local testing.
Q: Role of IPLMatchResultGUI.java?
A: To show match results in a GUI table format.
6. OOP Principles
7. Security
Q: What is DatabseConnectionCheck.java?
A: A test file to verify if the DB connection is successfully established.
9. Deployment
Q: How to run your project?
Q: Future scope?
• Add login/registration
ChatGPT said:
Absolutely! Here's an expanded list of fundamental and technical viva questions (with
answers) including Java basics, AWT/Swing, database, API, OOP, and project-related
concepts that you might be asked.
Q: What is AWT?
A: AWT (Abstract Window Toolkit) is Java’s original platform-dependent GUI toolkit used for
creating windows, buttons, and other GUI components.
Q: What is Swing?
A: Swing is a part of Java Foundation Classes (JFC) and is used to create lightweight,
platform-independent GUIs.
Q: What is JPanel?
A: A generic container inside a JFrame to group UI elements.
Q: What is an ActionListener?
A: An interface used to receive action events like button clicks.
Q: What is inheritance?
A: A mechanism where one class acquires properties of another.
Q: What is encapsulation?
A: Wrapping data and methods together, restricting direct access.
Q: What is abstraction?
A: Hiding internal details and showing only essential features.
Q: What is polymorphism?
A: The ability to take many forms, like method overloading and overriding.
Q: What is JDBC?
A: Java Database Connectivity API to connect and interact with databases.
2. Establish connection
3. Create statement
4. Execute query
5. Close connection
Q: What is a PreparedStatement?
A: A precompiled SQL statement to improve performance and prevent SQL injection.
Q: What is ResultSet?
A: It holds the result of a query.
Q: What is an API?
A: An Application Programming Interface allows interaction between software.
Q: What is JSON?
A: JavaScript Object Notation, a lightweight data-interchange format.
Project-Specific Questions
Here’s a list of important Java OOPs viva questions with brief answers to help you prepare
confidently:
o Encapsulation
o Inheritance
o Polymorphism
o Abstraction
Inheritance
6. What is inheritance?
It allows one class to acquire the properties and methods of another class using
extends.
o Single
o Multilevel
o Hierarchical
(Java doesn't support multiple inheritance with classes directly.)
Polymorphism
9. What is polymorphism?
Polymorphism means "many forms". It allows the same method to behave differently
based on the object.
• Abstract classes
• Interfaces
• A class can implement multiple interfaces but extend only one class.
Miscellaneous