Advanced Java Questions

Posted by Stephen thangaraj at 09:30

Advanced Java Questions

Q1. All Object Oriented Languages share three common defining traits, explain these.

A1. Encapsulation, Polymorphism and Inheritance. 

Q2. What is the difference between a class and a structure? 

A2. In a class, members are private by default. In a structure, members are public by default. 

Q3. What is the difference between a class and an object.

A3. A class defines an Objects methods and instance variables, i.e. the data it will store and methods to access that data. An Object is an instantiated Class which has a state.

Q4. What are the differences between an applet and an application.

A4. An application has no security restrictions, and is run like a normal application using java. An applet has security restrictions and is run either in an applet viewer or Web Browser. There is no main, as the applet viewer/Web Browser is the application and it instantiates the applet class instance you provide it.

Q5. What is swing.

A5. Swing is an enhanced version of AWT that provides light weight graphical components. These components are suitable for Applets that are going to be run within Web Browsers.

Q6. What are EJB's and how can they be used.

A6 Enterprise Java Beans come in two flavours, Entity and Session. The Entity EJB is an Object that has data like a record in a database. A Session EJB comes in two flavours, Stateful or Stateless, and this type of EJB is used for implementing Business rules.

click the Below link download this file 

If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!

Kindly Bookmark and Share it:



Have any question? Feel Free To Post Below:

Blog Archive


© 2011. All Rights Reserved | Interview Questions | Template by Blogger Widgets

Home | About | Top