-
Q: What is it reflection (introspection) ? Why is reflection possible in the Java language?
Reflection (introspection) is querying a class about its properties, and operating on methods and fields by the name for a given object instance. Reflection is possible in the Java language because of late binding.
-
What is the difference between Abstract class and Interface
Answered by Scott on 2005-05-12 10:03:06: An abstract class can contain non-abstract methods which do not have to be overridden in the subclass. There is no difference between a fully abstract class (all methods declared as abstract and all fields are public static final) and an interface.
-
Does a class inherit the constructors of its superclass
A class does not inherit constructors from any of its superclasses.
-
If a variable is declared as private, where may the variable be accessed
A private variable may only be accessed within the class in which it is declared.
-
What must a class do to implement an interface
It must provide all of the methods in the interface and identify the interface in itsimplements clause.
-
What is the difference between a break statement and a continue statement
A break statement results in the termination of the statement to which it applies (switch,for, do, or while). A continue statement is used to end the current loop iteration andreturn control to the loop statement.