Interview questions asked in Java Interview.
1.What is JVM?
The Java interpreter along with the runtime environment required to run the Java application in called as Java virtual machine(JVM)
- What is the most important feature of Java?
Java is a platform independent language.
- 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).
- 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 runtime environment and hence you will not be able to compile your source files using a JVM.
- What is the base class for all classes?
java.lang.Object All about NDA Exam, Eligibility, Preparation Tips.
- 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 the programmer cannot specify the friendly identifier explicitly. Follow us on Facebook.
- What is are packages?
A package is a collection of related classes and interfaces providing access protection and namespace management.
- 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 reusability of code and accessibility of variables and methods of the superclass by subclasses.
- What is the difference between superclass and subclass?
A superclass is a class that is inherited whereas subclass is a class that does the inheriting.
- What is an abstract class?
An abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.
- What are the states associated with the thread?
The thread contains ready, running, waiting and dead states.
- What is synchronization?
Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.
- What is a deadlock?
When two threads are waiting for each other and can’t precede the program is said to be a deadlock.
- What is an applet?
The applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser.
- What is the lifecycle of an applet?
init() method – Can be called when an applet is first loaded start
() method – Can be called each time an applet is started.
paint() method – Can be called when the applet is minimized or maximized.
stop() method – Can be used when the browser moves off the applet’s page.
destroy() method – Can be called when the browser is finished with the applet.
Elyuxen, a student newspaper where students get to work as well as publish all the news related to colleges in and around Hyderabad. It is the first ever student newspaper in South India which is successfully running. The beauty and the tagline of this newspaper is it is *For the student, by the student, of the student