Core Java Interview Questions Selenium
Core Java Interview Questions Selenium
A: JDK (Java Development Kit) is for development, JRE (Java Runtime Environment) is for running Java
applications, and JVM (Java Virtual Machine) is the engine that executes Java bytecode.
A: Access modifiers define the visibility of class members. Java has public, protected, default, and private
access levels.
A: '==' compares reference (memory address), whereas '.equals()' compares the content of objects.
Q: What is a constructor?
A: A constructor is a special method used to initialize objects. It has the same name as the class and no
return type.
A: Overloading is defining methods with the same name but different parameters. Overriding is redefining a
A: Polymorphism allows methods to perform different tasks based on the object calling them. It includes
A: An interface is a reference type in Java, similar to a class, that can contain only constants, method
A: Exceptions are problems that arise during program execution. Java has checked and unchecked
exceptions.
A: ArrayList uses dynamic arrays and is better for searching. LinkedList uses nodes and is better for
insertions/deletions.
A: HashMap is non-synchronized and allows one null key. Hashtable is synchronized and doesn't allow any