- All Java objects are created on ____ (heap/stack).
Ans: heap - A private method may be overridden by a private, friendly, ____ , or public method.
Ans: protected - A ____ class may not be sub classed.
Ans: final - An ___ class provides a way to defer implementation to subclasses.
Ans: abstract - Following is the correct declaration of method in java.
Ans: False - The following lines of code inside a method are valid(i.e will compile):
final MyCar myCar =new MyCar(“BMW”);
myCar=new Car(“Merc”);
Ans: False - In java a “protected” variable is more accessible than a default variable(variable with no access modifier).
Ans: True - A constant variable in java is marked ___.
Ans: final - A ___ variable is not stored as part of its object’s persistent state
Ans: transient - The “native” modifier applies only to methods while “volatile” applies only to variables.
Ans: True
Sunday, July 6, 2008
SCJP: Garbage Collection
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment