Tuesday, 19 March 2013

What are inner class and anonymous class?


What are inner class and anonymous class?  
Inner class : classes defined in other classes, including those defined in methods are called inner classes. An inner class can have any accessibility including private. Anonymous class : Anonymous class is a class defined inside a method without a name and is instantiated and declared in the same place and cannot have explicit constructors.

Blog Author: Vijay Kumar


What is a package?


What is a package?  
A package is a collection of classes and interfaces that provides a high-level layer of access protection and name space management.

Blog Author: Vijay Kumar


What is a reflection package?


What is a reflection package?  
java. lang. reflect package has the ability to analyze itself in runtime.

Blog Author: Vijay Kumar


What is interface and its use?


What is interface and its use?  
Interface is similar to a class which may contain method’s signature only but not bodies and it is a formal set of method and constant declarations that must be defined by the class that implements it. Interfaces are useful for: a)Declaring methods that one or more classes are expected to implement b)Capturing similarities between unrelated classes without forcing a class relationship. c)Determining an object’s programming interface without revealing the actual body of the class.

Blog Author: Vijay Kumar


What is an abstract class?


What is an abstract class?  
An abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.

Blog Author: Vijay Kumar