A) public String toString(int z) {
Return " " + x + " " + y + " " + z;
}
B) public String toString( ) {
Return super.toString( ) ;
}
C) public String toString( ) {
Return super.toString( ) + " " + z;
}
D) public String toString( ) {
Return super.toString( ) + " " x + " " + y + " " + z;
}
E) public String toString( ) {
Return " " + x + " + y + " " + z;
}
Correct Answer
verified
Multiple Choice
A) It has no parent class
B) Its parent class is Object
C) Its parent class is Java
D) It can not be extended
E) It has a default child called Object
Correct Answer
verified
True/False
Correct Answer
verified
Essay
Correct Answer
verified
View Answer
Multiple Choice
A) Wrapper
B) String
C) Reference
D) this
E) Object
Correct Answer
verified
Essay
Correct Answer
verified
Multiple Choice
A) It is accessible in A1, A2 and A3
B) It is accessible in A1 and A2
C) It is accessible only in A1
D) It is accessible only in A3
E) It is not accessible to any of the three classes
Correct Answer
verified
Multiple Choice
A) change private methods and instance data to be protected
B) change public methods and instance data to be protected
C) change all methods to be protected
D) change the class to be protected
E) none of the above, the programmer does not have to change anything
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) Person
B) Student
C) Employee
D) Retired
E) none of the above, this cannot be determined by examining the code
Correct Answer
verified
Multiple Choice
A) java.applet
B) java.awt
C) java.lang
D) java.japplet
E) javax.swing
Correct Answer
verified
Multiple Choice
A) listener
B) object
C) interface
D) GUI component
E) all of the above
Correct Answer
verified
Multiple Choice
A) A computer can be a mainframe or a PC
B) A PC can be a desktop or a laptop
C) A laptop is both a PC and a portable device
D) A portable device is a lightweight device
E) Macintosh and IBM PC are both types of PCs
Correct Answer
verified
Multiple Choice
A) There's nothing wrong with doing so
B) Abstract methods cannot be overriddenand they must be if a concrete class ever is to be instantiated
C) So long as the Abstract method never actually is used in by any other method, there's no problem with doing this
D) So long as the Abstract method is declared in a Class (not an Interface) , there's nothing wrong with doing this
E) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) has-a
B) is-a
C) was-a
D) instance-of
E) alias
Correct Answer
verified
Multiple Choice
A) protected
B) derivable
C) cloneable
D) polymorphic
E) none of the above, a variable declared to be of one class can never reference any other type of class, even an extended class
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) A1 is a subclass of A2 and A2 is a subclass of A3
B) A3 is a subclass of A2 and A2 is a subclass of A1
C) A1 and A2 are both subclasses of A3
D) A2 and A3 are both subclasses of A1
E) A1, A2 and A3 are all subclasses of the class A
Correct Answer
verified
Showing 1 - 20 of 71
Related Exams