Hai ra

Java interview question and answers



Java interview questions and answers freshers,Core Java Interview Questions and Answers,Top 10 Java Interview Questions with Answers ,java interview questions,java interview questions pdf,interview questions on java,java interview questions and answers pdf,java interview question,interveiw questions on java,free download java interview questions and answers.

Hai to all today Iam sharing Java interview questions and answer
here iam sharing the only Top Java interview questions and answers. one point to remember that java interview questions are not always written by experts so do cross check it before proceding. And morever do not butify Java interview questions as it is you may forget while interview.keep watching i will post some good posts here based on java interveiw questions free download for freshers.

Top 10 java interview questions.

Question1 Give the difference between an interface and an abstract class?
 Answer:  An interfaces cannot  have members and methods whereas Abstract classes can have  members,methods.
  
 Question 2When you will use abstract class or interface?
 Answer :  Interface is used only when you want to declare which methoad a class must have.if you have another implementation use abstract class.

Question 3What Serializable interface do ?
 Answer :  Through this object can be seralized.

Question 4can you force the garbage collection ?
Answer :  No you cannot force Garbage collection automatic process.

Question5 Define Synchronization in Java ?
 Answer :  Synchronization is nothing but  process of controlling the access of shared resources by the multiple threads .

Question 6What is memory leak in java ?
 Answer  :  It is  an unreferenced object that will never be used again still hangs around in memory and doesnt get garbage collected.

Question7. Tell me  difference between stringbuffer and stringbuilder ?
 Answer :  In case of StringBuffer is synchronized.StringBuilder is unsynchronized .

Question 8. give the difference between checked and unchecked exceptions ? 
Answer :  Unchecked exceptions represent defects in the program (bugs).
    Furthermore, checked exceptions represent invalid conditions

Question 9How does Java allocate stack and heap memory ?
Answer : based on object creation it will allocate stack and heap memory

  Question 10. What do you mean by Java Reflection ?
   Answer : Reflection is  used when programs require the ability to examine or modify the runtime behavior of applications .

Previous
Next Post »