Sunday, December 21, 2008

Interview Questions

What is a transient variable?

A transient variable is a variable that may not be serialized.

What is a synchronization and why is it important?

With respect to multithreading, synchronization is the capability to control the access of multiple

threads to shared resources. Without synchronization, it is possible for on thread to modify a

shared object while another thread is in the process of using or updating that objective's value.

This often leads to significant errors.

Is null a keyword?

The null value is not a keyword.

What is the vector class?

The vector class provides the capability to implement a growable array of objects.

What modifiers may be used with an inner class that is a member of an outer class?

A (non-local) inner calss may be declared as public, protected, private, static, final, or abstract.

What is an Iterator interface?

The Iterator interface is used to step through the elements of collection.

Can an anonymous class be declared as implementing an interface and extending a class?

An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.

What is the difference between yielding and sleeping?

When a task invokes its yield( ) method, it retruns to the ready state. When a task invokes its sleep( ) method, it returns to the waiting state.

What are wrapped classes?

wrapped classes are classes that allow primitive types to be accessed as objects.

No comments:

Post a Comment

 
Learn Unix Hit Counters |Earn More Money