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

Core Java Interview Questions Selenium

The document contains a list of core Java interview questions and answers relevant for Selenium Java interviews. Key topics include differences between JDK, JRE, and JVM, access modifiers, comparison methods, constructors, method overloading and overriding, polymorphism, interfaces, exceptions, and data structures like ArrayList vs LinkedList and HashMap vs Hashtable. Each question is followed by a concise explanation to aid in understanding Java fundamentals.

Uploaded by

Terala Manideep
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)
3 views2 pages

Core Java Interview Questions Selenium

The document contains a list of core Java interview questions and answers relevant for Selenium Java interviews. Key topics include differences between JDK, JRE, and JVM, access modifiers, comparison methods, constructors, method overloading and overriding, polymorphism, interfaces, exceptions, and data structures like ArrayList vs LinkedList and HashMap vs Hashtable. Each question is followed by a concise explanation to aid in understanding Java fundamentals.

Uploaded by

Terala Manideep
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
You are on page 1/ 2

Core Java Interview Questions for Selenium Java Interviews

Q: What is the difference between JDK, JRE, and JVM?

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.

Q: What are access modifiers in Java?

A: Access modifiers define the visibility of class members. Java has public, protected, default, and private

access levels.

Q: What is the difference between '=='' and '.equals()' in Java?

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.

Q: What is method overloading and overriding?

A: Overloading is defining methods with the same name but different parameters. Overriding is redefining a

method in a subclass that already exists in the parent class.

Q: What is Polymorphism in Java?

A: Polymorphism allows methods to perform different tasks based on the object calling them. It includes

method overloading and overriding.

Q: What is an interface in Java?

A: An interface is a reference type in Java, similar to a class, that can contain only constants, method

signatures, default methods, static methods, and nested types.

Q: What are exceptions in Java?

A: Exceptions are problems that arise during program execution. Java has checked and unchecked

exceptions.

Q: What is the difference between ArrayList and LinkedList?


Core Java Interview Questions for Selenium Java Interviews

A: ArrayList uses dynamic arrays and is better for searching. LinkedList uses nodes and is better for

insertions/deletions.

Q: What is the difference between HashMap and Hashtable?

A: HashMap is non-synchronized and allows one null key. Hashtable is synchronized and doesn't allow any

null key or value.

You might also like