You are on page 1of 6

10/26/2016

Top25CorejavainterviewquestionsforfreshersInstanceOfJava


Home
Phone Interview

Java SE

Java EE

Concept-Program

Interview Questions
Concept-Qsns

Programs
Sorting

Java Quiz

Bigdata

Home Core java Interview Questions Top 25 Core java interview questions for freshers

Top25Corejavainterviewquestionsforfreshers
Posted by: InstanceOfJava

Posted date: Dec 26, 2014

comment : 1

1.whatisatransientvariable?
A transient variable is a variable that whose value is not going to be serialized

2.Whatissynchronization?
With respect to multithreading, synchronization is the capability to control the access of multiple threads to
shared resources.
Without synchronization, it is possible for one thread to modify a shared object while another thread is in the
process of using or updating that objects value. This often leads to significant errors.

3.Whatsnewwiththestop(),suspend()andresume()methodsinJDK1.2?
The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.

4.Isnullakeyword?
"null" is not a keyword. .null is a literal.

5.Whatstatedoesathreadenterwhenitterminatesitsprocessing?
When a thread terminates its processing, it enters the dead state.

6.WhatistheCollectionsAPI?
The Collections API is a set of classes and interfaces that support operations on collections of objects.

7.WhatistheListinterface?
http://www.instanceofjava.com/2014/12/corejavainterviewquestions.html

1/6

10/26/2016

Top25CorejavainterviewquestionsforfreshersInstanceOfJava

The List interface provides support for ordered collections of objects which allows duplicate elements also.

8.WhatistheVectorclass?
The Vector class provides the capability to implement a growable array of objects

9.CanweinstantiateAbstractclass?
We can not create object for abstract class directly. but indirectly through sub class object we can achieve it.

10.Whatisthefirstkeywordusedinajavaprogram?
Its "package" keyword.

11.Whenaclassshouldbedefinedasfinal?
If we do not want allow subclasses.
If we do not want to extend the functionality.

12.Canwedeclareabstractmethodasstatic?
No, we are not allowed to declare abstract method as static.
It leads to compilation error: illegal combination of modifiers abstract and static.

13.Canweapplyabstractkeywordtointerface?
Yes, it is optional.
abstract interface A{}

14.Canwewriteemptyinterface?
Yes it is possible it is marker interface.
interface A{}

15.Canwedeclareinterfaceasfinal?
No, it leads to compile time error. Because it should allow sub class.

16.HowtosolveClassCastException?
To solve ClassCastException we should use instanceof operator.
obj instanceof class_name

17.Isxyzaprimitivevalue?
No, it is not primitive it is string literal.

18.Whenisanobjectsubjecttogarbagecollection?
An object is subject to garbage collection when it becomes unreachable to the program in which it is used.

19.Whatmethodmustbeimplementedbyallthreads?
http://www.instanceofjava.com/2014/12/corejavainterviewquestions.html

2/6

10/26/2016

Top25CorejavainterviewquestionsforfreshersInstanceOfJava

The run() method, whether they are a subclass of Thread or implement the Runnable interface.

20.Whathappensifanexceptionisnotcaught?
An uncaught exception results in the uncaughtException() method of the threads ThreadGroup being invoked,
which eventually results in the termination of the program in which it is thrown.

21.Howarethis()andsuper()usedwithconstructors?
this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.

22.Underwhatconditionsisanobjectsfinalize()methodinvokedbythegarbage
collector?
The garbage collector invokes an objects finalize() method when it detects that the object has become
unreachable.

23.Whatrestrictionsareplacedonmethodoverloading?
Methods should have same name and defer in parameters.

24.Whendoesthecompilersupplyadefaultconstructorforaclass?
The compiler supplies a default constructor for a class if no other constructors are provided.

25.Whatmodifierscanbeusedwithalocalinnerclass?
A local inner class may be final or abstract.
For More Questions Check below on your interest:
1. Concept and Interview Program
2. Concept and Interview Questions
3. 0-3 Years Core Java Interview Questions

1. Top 15 Garbage Collection Interview Questions


2. Top 10 Oops Concepts Interview Questions
3. Top 15 Java Interview Questions on Constructors

http://www.instanceofjava.com/2014/12/corejavainterviewquestions.html

3/6

10/26/2016

Top25CorejavainterviewquestionsforfreshersInstanceOfJava

4. Top 10 Inheritance Interview Questions


5. Interview Programs on Strings
6. 10 Interesting Core Java Interview Coding Questions and Answers
7. Top 20 Basic Java Interview Questions for Frehsers
8. Top 10 interview Question on Static keyword.
9.Top 20 Java interview Questions on Increment and Decrement operators
10.Top 10 Interview Questions on main() method
11. Top 12 Java Experienced interview Programming Questions on Strings
12.Pattern Programs in java Part-1
13.Pattern Programs in java Part-2
14.Pattern Programs in java Part-3
15. Collection framework interview programming questions

Share!
Tagged with:

10

Core java Interview Questions

InstanceOfJava

We will help you in learning.Please leave your comments and suggestions in comment section. if you any doubts please us
search box provided right side. Search there for answers thank you.

Next

Inner classes in java

Access Specifiers/modifiers in java

RelatedPosts
How to call non static method from static
method java

Calling static method from non static


method in java

24 Sep 2016

24 Sep 2016

How to read a file in java with example program

Can an abstract class have a constructor in Java

27 Aug 2016

26 Aug 2016

http://www.instanceofjava.com/2014/12/corejavainterviewquestions.html

4/6

10/26/2016

Top25CorejavainterviewquestionsforfreshersInstanceOfJava

Static method vs final static method in java


with example programs
21 Aug 2016

1 comments for Top 25 Core java interview questions for freshers

Apr 27, 2015, 11:05:00 PM

man4j

17. Is xyz a primitive value? No, It's literal ))))))

Enteryourcomment...

Commentas:

Publish

RajuSai(Google)

Signout

Notifyme

Preview

Newer Post

FollowbyEmail

Home

Pages

http://www.instanceofjava.com/2014/12/corejavainterviewquestions.html

Labels
5/6

10/26/2016

Emailaddress...

Top25CorejavainterviewquestionsforfreshersInstanceOfJava

Submit

Home

Collections

Core Java Tutorial

Concept and Interview Que

Servlet Tutorial

concept and program

0-3 years experience Java interview


questions and answers for Freshers and
experienced

Core java Interview Questio

Java Programs asked in Interviews

Find Output of Program

Java Collections Tutorial

Java 8

Jsp Tutorial

Java EE

Concept and Example Programs

Java Programs

Concept and Interview Questions

Java SE

What is out put of following program

Jsp

Design patterns in java

Oracle

Register With Us

Servlets Tutorial

Design Pattern

Copyright 2014-2015 instanceofjava.com , All rights reserved | Privacy policy | About Us

http://www.instanceofjava.com/2014/12/corejavainterviewquestions.html

6/6

You might also like