Simple Quiz based on basics of Core Java covering almost all important aspects of programming language.
Make sure to come out with flying colors.
Passing: 80%
Time: 30 Minutes
www. Java-interviewer. Blogspot. Com
Wear Ornaments, Run Anywhere
Write Once, Run Anywhere
Write Once, Read Again
Write Only, Read Only
Rate this question:
Public
Private
Protected
Default
Rate this question:
True
False
Rate this question:
NullPointerException
NumberFormatException
ArrayIndexOutOfBoundException
FileNotFoundException
Rate this question:
Yes, You can
No, You can not. It will give you IllegalThreadStateException if you try to restart a dead thread.
Rate this question:
List< Person > list = new ArrayList< Person >();
List< Employee > list = new List< Employee >();
List< Employee > list = new ArrayList< Person >();
List< Person > list = new ArrayList< Employee >();
Rate this question:
True
False
Rate this question:
For (String s : list) {....}
Iterator iterator = list.iterator(); while(iterator.hasNext()){ System.Out.println(iterator.next()); }
Rate this question:
For
While
Do while
Switch
Rate this question:
Final
New
Volatile
Super
Rate this question:
True
False
Rate this question:
Hashtable is synchronised while HashMap is not
HashMap is faster than Hashtable
Rate this question:
Equals
Hashcode
ToString
Clone
Wait
Run
Rate this question:
False
True
Rate this question:
An interface who do not have any methods
JVM gives special treatment to such interfaces
Clonable, Serializable are some examples of marker interface
Rate this question:
There is no difference
Run method will just execute the code in main method while start method will actually execute the code in new thread
Start method will just execute the code in main method while run method will actually execute the code in new thread
Rate this question:
By extending Thread class
By implementing Runnable interface
By implementing Threadable interface
Rate this question:
TreeSet
TreeMap
LinkedList
LinkedHashSet
Rate this question:
LinkedList
ArrayList
Vector
HashSet
Rate this question:
True
False
Rate this question:
Vector
ArrayList
Rate this question:
List
Queue
Map
Set
Rate this question:
List
Set
Map
Queue
Rate this question:
100
11
0
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
0 to 1
0 to many
Unlimited
Rate this question:
Public abstract interface Talkable{}
Interface Talkable{}
Private final interface Talkable{}
Public interface Talkable{}
Rate this question:
True
False
Rate this question:
System.gc();
Runtime.getRuntime().gc();
System.garbageCollection()
This.gc()
Rate this question:
Whose values are null
Which are not referenced further
Isolated objects
Rate this question:
Throwable
Runnable
Callable
Collection
Rate this question:
1
2
1 and 2
Runtime Error
Rate this question:
Try-catch-finally
Try-catch
Try-multiple catch
Try-finally
Catch-finally
Try-multiple catch-finally
Rate this question:
True
True, except if System.exit() is called
False
Rate this question:
1
100
0.75
0.25
Rate this question:
JVM stands for Java Virtual Machine
JRE stands for Java Runtime Environment
JDK stands for Java Development Kit
JCF stands for Java Collection Framework
Rate this question:
Package (if any) statement must be the first statement of your source file
You can import zero to multiple classes to your source file using import statements
For multi-line comments, /* code to comment */ can be used
Java is platform dependent because of JVM
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
Abstract
Final
Null
Volatile
Rate this question:
Null
Volatile
Transient
Assert
Rate this question:
Final
Abstract
Static
Public
Rate this question:
A Class is a template that describes the kinds of state and behavior that objects of its type support
Object is an instance of a class
All methods of an interface are implicitly public and abstract
Constructors can not be overloaded
Rate this question:
True
False
Rate this question:
Inheritance
Poly Morphism
Encapsulation
Abstraction
Rate this question:
False
True
Rate this question:
Quiz Review Timeline (Updated): Mar 22, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.