Wednesday, December 11, 2013

Core Java Questions

1. In terms of Inheritance , what is the effect of keeping a constructor private ?
A: Declaring the constructor private will ensure that no one outside the class can directly instantiate the class. The only way to create an instance of the class is to provide public static method as is done when using factory method pattern. Additionally since the constructor is private, the class cannot be inherited.

2. Final,Finally and Finalize

3. Generics in Java

4.Object Reflection in Java

5. Implement a Circular Array Class with Iterator.

No comments:

Post a Comment