Java Viva Questions Answers
Java Viva Questions Answers
A: Java code is compiled into bytecode which can be executed on any system with JVM.
Q: What is bytecode?
A: Bytecode is an intermediate code generated by the Java compiler, executed by the JVM.
A: Inheritance allows one class to acquire properties and methods of another class.
A: Mechanism to handle runtime errors using try, catch, throw, throws, and finally.
A: try {
int a = 5/0;
} catch (ArithmeticException e) {
} finally {
Q: What is an Applet?
Q: What is a socket?
Q: Types of Beans?
Q: What is a Servlet?
A: Allows Java code inside HTML using <% %>, <%= %>, <%! %>
Q: What is Hibernate?
Q: Advantages of Hibernate?
Q: What is HQL?