Friday, November 14, 2014

Nitheen Kumar

JAVA Interview Question and Answers

1.What is JVM?

The Java interpreter along with the run time environment required to run the Java application in called as Java virtual machine(JVM)

2. What is the most important feature of Java?

Java is a platform independent language.

3. What do you mean by platform independence?

Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).

4. What is the difference between a JDK and a JVM?

JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.

5. What is the base class of all classes?

java.lang.Object

6. What are the access modifiers in Java?

There are 3 access modifiers. Public, protected and private, and the default one if no identifier is specified is called friendly, but programmer cannot specify the friendly identifier explicitly.

7. What is are packages?

A package is a collection of related classes and interfaces providing access protection and namespace management.

8. What is meant by Inheritance and what are its advantages?

Inheritance is the process of inheriting all the features from a class. The advantages of inheritance are re usability of code and accessibility of variables and methods of the super class by sub classes.

9. What is the difference between super class and subclass?

A super class is a class that is inherited whereas sub class is a class that does the inheriting.

10. What is an abstract class?

An abstract class is a class designed with implementation gaps for sub classes to fill in and is deliberately incomplete.
Prv 1 2 3 4 5 6 Next

Subscribe to get more Posts :