Select chapter



basics (7.papers)
constructors (1.papers)
packages (1.papers)
inheritance (7.papers)
misc (3.papers)
exceptions (5.papers)
threads (4.papers)
overloading (1.papers)
jsp (3.papers)
servlets (9.papers)
jdbc (2.papers)
util (1.papers)
xml (2.papers)
IO stream (3.papers)
Hide

Sponsored Links


  

java basics interview questions and answers

1
What is a class?
  1. Class is a blue print from which individual objects are created.
  2. Class is a real entity.
  3. Class is same as object, only difference is object will not have real existence.
Show Answer
Share Facebook gmail Twitter
2
What is an object?
  1. Any real world entity which has some states and behaviors is an Object.
  2. Any class is also known as an object.
  3. Class is used to create object.
Show Answer
Share Facebook gmail Twitter
3
What is the full form of JVM?
  1. Java Volatile machine
  2. java volatile memory
  3. Java Virtual Machine
  4. none
Show Answer
Share Facebook gmail Twitter
4
Java software is under which license?
  1. a free software (open source) - Apache license
  2. a free software (open source) - GPL license
  3. Not a free software (closed source)
  4. None of the above
Show Answer
Share Facebook gmail Twitter
5
which of the below statements are false about global variables in java?
  1. Java has instance variables and class variables.
  2. In java we declare global variables out side a class.
  3. In java we can simulate global variable concept to some extent by using static or class variables.
  4. all are false.
Show Answer
Share Facebook gmail Twitter
6
What is the class for any building constructed by civil engineer?
  1. class Building{..} is its class.
  2. Plan given by civil engineer is the class for the building that is constructed.
  3. there is no class for building object.
  4. building it self is the class, and rooms in the building are objects.
Show Answer
Share Facebook gmail Twitter
7
What is encapsulation?
  1. Wrapping up of data and behaviors together in a single box is called as encapsulation. it is the basic property of OOPs.
  2. Inheritance and encapsulation is same.
  3. Encapsulation means hiding the data.
Show Answer
Share Facebook gmail Twitter
8
Is it mandatory that every class has to enforce data security fully, in java?
  1. Yes, of course.
  2. It depends on the project or design requirements. It doesn't enforce completely, but where ever it is required programmer can apply it by using access modifiers.
  3. No. It is impossible to have data security in Java.
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
11
java compiler (javac) is part of___ ?
  1. JRE
  2. JDK
  3. Its independent component
  4. its part of JVM
Show Answer
Share Facebook gmail Twitter
12
Who owns java now?
  1. Sun Micro systems
  2. Oracle
  3. Google
  4. IBM
Show Answer
Share Facebook gmail Twitter
13
Does encapsulation guarantee the data security?
  1. Yes we have data security in any OOPs languages if we use encapsulation property.
  2. Encapsulation doesn't guarantee the data security, but it provides a way to achieve it. It can be done through encapsulation with access modifiers to data members of the class.
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
16
Is JVM stack based or register based?
  1. JVM is register based.
  2. JVM is stack based architecture.
Show Answer
Share Facebook gmail Twitter
17
Is JVM platform dependent or independent?
  1. JVM is platform dependent. Means every platform should use its own JVM. for example you can't use JVM of windows in Linux platform.
  2. JVM is platform independent. there will be only one JVM for all platforms, that's why java is platform independent.
Show Answer
Share Facebook gmail Twitter
18
Where does java program execute?
  1. either in RAM or hard disk.
  2. in CPU
  3. Every java program executes in JVM.
  4. in ROM
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
20
Is it mandatory that every JVM should implement its own Garbage collector?
  1. Yes it is mandatory that every JVM should implement garbage collector.
  2. It is unpredictable
  3. In sun micro documentation there is no specific documentation telling if it is really mandatory to implement Garbage Collector for JVMs.
Show Answer
Share Facebook gmail Twitter
Read more papers :