Answer is C
compiler add super() as first statement in constructor . hence super class constructor gets called and super class initialized before child class
The correct answer is C
class A {
public A() {
System.out.println("A ");
}
}
class B extends A {
public B() {
System.out.println("B ");
}
}
class C extends B {
public C() {
System.out.println("C ");
}
public static void main(String[] args) {
C c = new C();
}
}
correct,
implecit super() method execution before each system.out.println of each constructor
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
M_Jawad
Highly Voted 5 years, 6 months agoM_Jawad
Highly Voted 5 years, 6 months agovic88
Most Recent 7 months, 1 week agoAhmadTechie
1 year, 7 months agoduydn
1 year, 10 months agoDolly2901
1 year, 11 months agoVicky_65
2 years, 3 months agojjgry
2 years, 3 months agoSSJ5
4 years, 3 months agomete23
5 years, 5 months agov323rs
5 years, 5 months agoMamlouk_Med
6 years, 4 months ago