What is the output of running the class C. public class C {
Public static void main(String[] args) {
Object[] o = {new A() , new B() };
System.out.print(o[0]) ;
System.out.print(o[1]) ;
}
}
Class A extends B {
Public String toString() {
Return "A";
}
}
Class B {
Public String toString() {
Return "B";
}
}
A) AB
B) BA
C) AA
D) BB
E) None of above
Correct Answer:
Verified
Q1: When you implement a method that is
Q3: What exception type does the following program
Q4: What is the output of running class
Q5: What is wrong in the following code?
Test
Q6: Which of the following possible modifications will
Q7: Write a method to find the max
Q9: What is wrong in the following code?
Test
Q10: Analyze the following code. class Test {
Public
Q11: The program has a syntax error because
Q13: Show the output of running the class
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents