April 28, 2013

Core Java Interview Questions And Answers

Que- What is a transient variable?
Ans- A transient variable is a variable that may not be serialized.


Que- Which containers use a border Layout as their default layout?
Ans- The window, Frame and Dialog classes use a border layout as their default layout.


Que- Why do threads block on I/O?
                                                                                       Ans- Threads block on i/o (that is enters the
waiting state) so that other threads may execute while the i/o Operation is performed.


Que- How are Observer and Observable used?
Ans- Objects that subclass the Observable class maintain a list of observers. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. The Observer interface is implemented by objects that observe Observable objects.


Que- Can a lock be acquired on a class?
Ans- Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.

0 comments:

Post a Comment

  • Blogger news

    This Blog Contains All Topics Related To Internet, Website Help, Interview Questions, News, Results From Various Resources, Visit Daily For More Interesting And Famous Topics.
  • Random Post

  • About

    We Provide All Information Which you Needed. We Maintain This Blog Very Carefully, If You Find Any Mistake or Any Suggestions Then Please Let Us Know, You Can Contact Us By Comments, On FB Page Or On Google+ Page. ~ Thank You