Java Interview Question And Answer Which package is always imported by default

189 views · Published 26 December 2013 · 2:47 · Indexed 22 October 2026

Channel: Interview DOT · 2013 · Science & Technology

Watch on YouTube

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. Java Interview Question And Answer Which package is always imported by default

1.Which package is always imported by default ?

The java.lang package is always imported by default.

2.What interface must an object implement before it can be written to a stream as an object ?

An object must implement the Serializable or Externalizable interface before it can be written to a stream as
an object.

3.What is the purpose of garbage collection ?

The purpose of garbage collection is to identify and discard objects that are no longer needed by a program
so that their resources may be reclaimed and reused.

4.What is a compilation unit ?

A compilation unit is a Java source code file.

5.How are this and super used ?

this is used to refer to the current object instance. super is used to refer to the variables and methods of the
superclass of the current object instance.

A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

Other Top Job Portals
www.Naukri.com
www.MonsterIndia.com
www.TimesJobs.com

Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

More from this channel