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

Java Internship Interview QA

The document provides a list of common interview questions and answers for a Java Developer Internship. Key topics include the definition of Java, its main features, differences between JDK, JRE, and JVM, as well as concepts like constructors, inheritance, interfaces, access modifiers, and exception handling. Each answer succinctly explains the relevant Java concepts and terminology.
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)
17 views2 pages

Java Internship Interview QA

The document provides a list of common interview questions and answers for a Java Developer Internship. Key topics include the definition of Java, its main features, differences between JDK, JRE, and JVM, as well as concepts like constructors, inheritance, interfaces, access modifiers, and exception handling. Each answer succinctly explains the relevant Java concepts and terminology.
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

Java Developer Internship - Interview Questions and Answers

Q: What is Java?

A: Java is a high-level, object-oriented programming language developed by Sun Microsystems. It is

platform-independent due to the Java Virtual Machine (JVM), which allows Java code to run on any

device.

Q: What are the main features of Java?

A: - Platform Independent

- Object-Oriented

- Robust and Secure

- Multithreaded

- High Performance

- Dynamic and Portable

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

A: - JDK (Java Development Kit): A full software development kit including JRE and development

tools like compilers.

- JRE (Java Runtime Environment): Provides runtime environment and contains JVM and libraries.

- JVM (Java Virtual Machine): Executes Java bytecode and provides platform independence.

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

A: - == compares object references (memory location).

- .equals() compares the actual content of objects (like string values).

Q: What is a constructor in Java?

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 the difference between overloading and overriding?

A: - Overloading: Same method name, different parameters (within the same class).
- Overriding: Same method name and parameters in a subclass to provide specific behavior.

Q: What is inheritance in Java?

A: Inheritance is a mechanism where one class (child) inherits properties and behavior from another

class (parent), promoting code reusability.

Q: What is an interface?

A: An interface in Java is a collection of abstract methods. It is used to achieve abstraction and

multiple inheritance.

Q: What are access modifiers in Java?

A: Access modifiers define the scope of classes, methods, and variables.

- private

- default

- protected

- public

Q: Can you explain exception handling in Java?

A: Exception handling manages runtime errors using:

- try: code block to monitor

- catch: handles exceptions

- finally: executes code regardless of exception

- throw and throws: used to manually throw exceptions

You might also like