What are synchronized methods and synchronized statements? , Can applets communicate with each other?

What are synchronized methods and synchronized statements?
Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method’s object or class. Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread [...]

Can a top level class be private or protected? , What are wrapper classes?

Can a top level class be private or protected?
No. A top level class can not be private or protected. It can have either “public” or no modifier. If it does not have a modifier it is supposed to have a default access.If a top level class is declared as private the compiler will complain that [...]

What is the difference between an Interface and an Abstract class?

What is the difference between an Interface and an Abstract class?

An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is [...]

What is Data Access Object pattern? , Can we make an EJB singleton?

What is Data Access Object pattern?
The Data Access Object (or DAO) pattern: separates a data resource’s client interface from its data access mechanisms adapts a specific data resource’s access API to a generic client interface
The DAO pattern allows data access mechanisms to change independently of the code that uses the data.
The DAO implements the access [...]

What are the two basic ways in which classes that can be run as threads may be defined?

What are the two basic ways in which classes that can be run as threads may be defined?
A thread class may be declared as a subclass of Thread, or it may implement the Runnable interface.
What is the difference between an if statement and a switch statement?
The if statement is used to select among two alternatives. [...]

What an I/O filter? , What is the difference between a field variable and a local variable?

Which class should you use to obtain design information about an object?
The Class class is used to obtain information about an object’s design.

What is the relationship between clipping and repainting?
When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of the window that requires repainting.

Is “abc” [...]

What method is invoked to cause an object to begin executing as a separate thread?

What is the difference between a break statement and a continue statement?

A break statement results in the termination of the statement to which it applies (switch, for, do, or while). A continue statement is used to end the current loop iteration and return control to the loop statement.
What must a class do to implement an [...]

What value does readLine() return when it has reached the end of a file?

Can an object’s finalize() method be invoked while it is reachable?
An object’s finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object’s finalize() method may be invoked by other objects.
What is the immediate superclass of the Applet class?

Panel
What is the difference between preemptive scheduling and time slicing?
Under [...]

What’s the difference between the methods sleep() and wait() ?

What is the difference between final, finally and finalize?
final is used for making a class no-subclassable, and making a member variable as a constant which cannot be modified. finally is usually used to release all the resources utilized inside the try block. All the resources present in the finalize method will be garbage collected whenever [...]

What is the difference between final, finally and finalize?

What is the difference between final, finally and finalize?
Short answer:
final – declares constant
finally – relates with exception handling
finalize – helps in garbage collection
If asked to give details, explain:
final field, final method, final class
try/finally, try/catch/finally
protected void finalize() in Object class

What kind of security tools are available in J2SE 5.0?
There are three tools that can be used [...]