Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What Is The Use Of Serializable?

Answer»

To PERSIST the STATE of an OBJECT into any perminant STORAGE DEVICE.

To persist the state of an object into any perminant storage device.

2.

Does The Jdbc-odbc Bridge Support Multiple Concurrent Open Statements Per Connection?

Answer»

No

No

3.

Is Jdbc-odbc Bridge Multi-threaded?

Answer»

No

No

4.

What Are The Different Driver Types Available In Jdbc?

Answer»
  1. A JDBC-ODBC BRIDGE
  2. A native-API PARTLY Java technology-enabled DRIVER
  3. A net-protocol fully Java technology-enabled driver
  4. A native-protocol fully Java technology-enabled driver For more INFORMATION.

5.

What Is Hash-collision In Hashtable And How It Is Handled In Java?

Answer»

TWO different keys with the same hash VALUE. Two different ENTRIES will be kept in a single hash BUCKET to AVOID the collision.

Two different keys with the same hash value. Two different entries will be kept in a single hash bucket to avoid the collision.

6.

What Is The Algorithm Used In Thread Scheduling?

Answer»

FIXED PRIORITY SCHEDULING.

Fixed priority scheduling.

7.

What Is A Thread?

Answer»

THREAD is a block of code which can EXECUTE concurrently with other THREADS in the JVM.

Thread is a block of code which can execute concurrently with other threads in the JVM.

8.

What Is A Hashcode?

Answer»

HASHCODE VALUE for this OBJECT which is UNIQUE for EVERY object.

hashcode value for this object which is unique for every object.

9.

What Is The Protocol Used By Rmi?

Answer»

RMI-IIOP

RMI-IIOP

10.

What Do You Mean By Rmi And How It Is Useful?

Answer»

RMI is a REMOTE method invocation. Using RMI, you can work with remote object. The FUNCTION calls are as though you are invoking a local variable. So it gives you a impression that you are WORKING really with a object that resides within your own JVM though it is somewhere.

RMI is a remote method invocation. Using RMI, you can work with remote object. The function calls are as though you are invoking a local variable. So it gives you a impression that you are working really with a object that resides within your own JVM though it is somewhere.

11.

What Is The Difference Between Interface And Abstract Class?

Answer»

Abstract class defined with methods. Interface will declare only the methods. Abstract CLASSES are very much USEFUL when there is a some functionality across various classes. Interfaces are well suited for the classes which varies in functionality but with the same method SIGNATURES.

Abstract class defined with methods. Interface will declare only the methods. Abstract classes are very much useful when there is a some functionality across various classes. Interfaces are well suited for the classes which varies in functionality but with the same method signatures.

12.

What Is The Purpose Of Abstract Class?

Answer»

It is not an instantiable CLASS. It provides the concrete implementation for some/all the METHODS. So that they can reuse the concrete functionality by INHERITING the abstract class.

It is not an instantiable class. It provides the concrete implementation for some/all the methods. So that they can reuse the concrete functionality by inheriting the abstract class.

13.

What Is The Eligibility For A Object To Get Cloned?

Answer»

It MUST IMPLEMENT the Cloneable INTERFACE

It must implement the Cloneable interface

14.

What Interface Do You Implement To Do The Sorting?

Answer»

Comparable

Comparable

15.

What Is Class.forname() Does And How It Is Useful?

Answer»

It LOADS the class into the CLASSLOADER. It returns the Class. USING that you can get the instance ( “class-instance”.newInstance() ).

It loads the class into the ClassLoader. It returns the Class. Using that you can get the instance ( “class-instance”.newInstance() ).

16.

What Is Driver Manager?

Answer»

The basic service to MANAGE SET of JDBC drivers.

The basic service to manage set of JDBC drivers.

17.

What Is Singleton?

Answer»

It is one of the design PATTERN. This falls in the creational pattern of the design pattern. There will be only one instance for that entire JVM. You can achieve this by having the PRIVATE constructor in the class.

For eg.,

PUBLIC class SINGLETON

{

private static final Singleton s = new Singleton();

private Singleton()

{

}

public static Singleton getInstance()

{

RETURN s;

}

// all non static methods …

}

It is one of the design pattern. This falls in the creational pattern of the design pattern. There will be only one instance for that entire JVM. You can achieve this by having the private constructor in the class.

For eg.,

public class Singleton

{

private static final Singleton s = new Singleton();

private Singleton()

{

}

public static Singleton getInstance()

{

return s;

}

// all non static methods …

}

18.

What Are The Methods In Object?

Answer»

CLONE, equals, WAIT, finalize, GETCLASS, hashCode, NOTIFY, notifyAll, toString

clone, equals, wait, finalize, getClass, hashCode, notify, notifyAll, toString

19.

What Is Aggregation?

Answer»

It is a special TYPE of COMPOSITION. If you EXPOSE all the methods of a COMPOSITE class and route the method CALL to the composite method through its reference, then it is called aggregation.

It is a special type of composition. If you expose all the methods of a composite class and route the method call to the composite method through its reference, then it is called aggregation.

20.

What Is Inner Class?

Answer»

If the methods of the inner CLASS can only be accessed VIA the INSTANCE of the inner class, then it is called inner class.>

If the methods of the inner class can only be accessed via the instance of the inner class, then it is called inner class.>

21.

What Is Nested Class?

Answer»

If all the METHODS of a INNER CLASS is STATIC then it is a NESTED class.

If all the methods of a inner class is static then it is a nested class.

22.

What Is The Significance Of Listiterator?

Answer»

You can ITERATOR BACK and FORTH.

You can iterator back and forth.

23.

What Is The Final Keyword Denotes?

Answer»

FINAL keyword denotes that it is the final IMPLEMENTATION for that METHOD or variable or class. You can’t OVERRIDE that method/variable/class any more.

final keyword denotes that it is the final implementation for that method or variable or class. You can’t override that method/variable/class any more.

24.

What Is Skeleton And Stub? What Is The Purpose Of Those?

Answer»

Stub is a client side REPRESENTATION of the SERVER, which takes care of COMMUNICATING with the remote server. Skeleton is the server side representation. But that is no more in use… it is DEPRECATED long before in JDK.

Stub is a client side representation of the server, which takes care of communicating with the remote server. Skeleton is the server side representation. But that is no more in use… it is deprecated long before in JDK.