Friday, February 8, 2008

Interview Questions that were interesting...

Have you used Distributed Cache Product

http://www.oracle.com/products/middleware/coherence/index.html

The Leading Distributed In-Memory Data Grid Solution
Oracle Coherence is a component of Oracle Fusion Middleware that enables organizations to predictably scale mission-critical applications by providing fast and reliable access to frequently used data. By automatically and dynamically partitioning data in memory across multiple servers, Oracle Coherence enables continuous data availability and transactional integrity, even in the event of a server failure. As a shared infrastructure, Oracle Coherence combines data locality with local processing power to perform real-time data analysis, in-memory grid computations, and parallel transaction and event processing. Oracle Coherence comes in three editions. Find the edition that's right for you.

Announcing Oracle Coherence 3.3
Among many enhancements in the new release are improved performance, Quality-of-Service and clustering capabilities, and support for Microsoft's .NET Framework.

Do you know what a Covariant return type?

In J2SE 5 a method in a subclass may return an object whose type is a subclass of the type returned by the method with the same signature in the superclass. This feature removes the need for excessive type checking and casting.

More specifically, covariance of the return type refers to a situation where the return type of the overriding method is changed to a type related to (but different from) the return type of the original overridden method. The relationship between the two covariant return types is usually one which allows substitution of the one type with the other, following the Liskov substitution principle. This usually implies that the return types of the overridding methods will be subtypes of the return type of the overridden method. The above example specifically illustrates such a case.

http://en.wikipedia.org/wiki/Covariant_return_type

What is an anonymous class? What is it used for?

An anonymous class can be particularly useful in those cases where
There is no reason for an object of the anonymous class to exist in the absence of an object of the enclosing class.
There is no reason for an object of the anonymous class to exist outside a method of the enclosing class.
Methods of the object of the anonymous class need access to members of the object of the enclosing class.
Methods of the object of the anonymous class need access to final local variables and method parameters belonging to the method in which the anonymous class is defined.
Only one instance of the anonymous class is needed.
There is no need for the class to have a name that is accessible elsewhere in the program.

Write a bean class that utilizes generics in its syntax?

public class GenericsBean <T> {

private T t; // T stands for "Type"

public void set(T t) {
this.t = t;
}

public T get() {
return t;
}
}

Type Parameter Naming Conventions

E - Element (used extensively by the Java Collections Framework)
K - Key
N - Number
T - Type
V - Value
S,U,V etc. - 2nd, 3rd, 4th types


Hibernate version have you used?

EJB Version?

CDN experience content delivery networks

No comments: