Download 164 Java Interview Questions by Nageswara Rao _ JAVAbyNATARAJ PDF

Title164 Java Interview Questions by Nageswara Rao _ JAVAbyNATARAJ
File Size1.4 MB
Total Pages18
Document Text Contents
Page 2

11/19/2014 164 Java Interview Questions by Nageswara Rao | JAVAbyNATARAJ

http://javabynataraj.blogspot.in/2009/08/java-interview-questions.html 2/20

3) Which part of JVM will allocate the memory for a java program?
Ans). Class loader subsystem of JVM will allocate the necessary memory needed by the java
program.

4). which algorithm is used by garbage collector to remove the unused
variables or objects from memory?

Ans). Garbage collector uses many algorithms but the most commonly used algorithm is mark and
sweep.

5). How can you call the garbage collector?

Ans). Garbage collector is automatically invoked when the program is being run. It can be also
called by calling gc() method of Runtime class or System class in Java.

6) What is JIT Compiler?

Ans). JIT compiler is the part of JVM which increases the speed of execution of a Java program.

7) What is an API document?

Ans). An API document is a .html file that contains description of all the features of a softwar, a
product, or a technology. API document is helpful for the user to understand how to use the
software or technology.

8) What is the difference between #include and import statement?

Ans). #include directive makes the compiler go to the C/C++ standard library and copy the code
from the header files into the program. As a result, the program size increases, thus wasting
memory and processor’s time.

import statement makes the JVM go to the Java standard library, execute the code there , and
substitute the result into the program. Here, no code is copied and hence no waste of memory or
processor’s time. so import is an efficient mechanism than #include.

9) What is the difference between print( ) and println( ) method ?

Ans). Both methods are used to display the results on the monitor. print( ) method displays the
result and then retains the cursor in the same line, next to the end of the result. println( ) displays
the result and then throws the cursor to the next line.

10) What happens if String args[] is not written in main( ) method ?

Ans). When main( ) method is written without String args[] as:

Public static void main( )

The code will compile but JVM cannot run the code because it cannot recognize the main( ) as the
method from where it should start execution of the Java program. Remember JVM always looks
for main( ) method with string type array as parameter.

11) What is the difference between float and double?

Ans). Float can represent up to 7 digits accurately after decimal point, where as double can
represent up to 15 digits accurately after decimal point.

12) What is a Unicode system ?

Ans). Unicode system is an encoding standard that provides a unique number for every character,
no matter what the platform, program, or language is. Unicode uses 2 bytes to represent a single
character.

Join this site
with Google Friend Connect

Members (795) More »

Already a member? Sign in

POPULAR POSTS

OCJP and Core Java class notes by

RamiReddy sir

DurgaSoft SCJP Notes Part-I

Download

Web Services notes by Mr Sekhar

from Naresh i Tecnologies

Advaced Java Notes by Mr.Nataraj

from Ameerpeta

164 Java Interview Questions by

Nageswara Rao

DurgaSoft OCJP(SCJP) Notes Part-II

Download

Spring notes by Mr.Nataraz from

Sathya Technologies

Struts Flow and Architecture

Web Services Notes by Nataraj sir

from Sathya Technologies

Hibernate notes by Sekhar sir from

Naresh i Technologies

► Java On
► Java Notes
► Of Java

► Java Notes
► Of Java
► Java New

Java - Synchronized block and method in detail..

Click Here

http://javabynataraj.blogspot.in/2014/09/java-synchronized-block-and-method-in.html

Page 9

http://disqus.com/disqus_RxAef6e7QG/

Page 10

http://javabynataraj.blogspot.in/2011/04/what-is-serialization-write-simple.html

Page 18

http://javabynataraj.blogspot.in/2009/08/java-interview-questions.html#comment-1580594671
https://disqus.com/home/user/disqus_fgG2SIrdiR/
https://disqus.com/home/user/disqus_fgG2SIrdiR/
http://javabynataraj.blogspot.in/2010/09/java-packages-and-interface_29.html
http://javabynataraj.blogspot.in/2010/09/java-interview-questions-downlaod.html
http://www.flipkart.com/core-java-integrated-approach-1/p/itmdyufztstvjzy4?pid=9788177228366&affid=muralidhar
http://www.flipkart.com/core-java-advanced-features-volume-2-8/p/itmdytt8qynvenvk?pid=9788131725351&affid=muralidhar
http://www.flipkart.com/core-javaserver-faces-3/p/itmczyqfsafyyf9e?pid=9788131761922&affid=muralidhar
http://javabynataraj.blogspot.in/2009/08/java-interview-questions.html
http://javabynataraj.blogspot.com/2009/08/java-interview-questions.html#disqus_thread
http://www.blogger.com/email-post.g?blogID=2423708031295238982&postID=2031623121457718051
http://javabynataraj.blogspot.in/search/label/CoreJava
http://javabynataraj.blogspot.in/search/label/Interview%20Questions
http://javabynataraj.blogspot.in/2012/10/importance-of-tostring-in-java.html
http://javabynataraj.blogspot.in/2010/09/java-interview-questions-downlaod.html
http://javabynataraj.blogspot.in/2011/09/convert-string-to-character-array.html
http://javabynataraj.blogspot.in/2009/06/42struts-architecture.html
http://javabynataraj.blogspot.in/2011/04/3-write-program-to-write-data-into-file.html

Similer Documents