Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Prateek Singla

Greenhorn
+ Follow
since Dec 18, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prateek Singla

So.. Is it like.. first statics, gets initialized irrespective of the fact from where they come from in inheritance tree and then, main method code starts and then before any object is instationized the no argument constructor runs...
9 years ago
Hi, I am new to this form. I came up across this code in Head First Java, if someone could explain my small doubt, I would really appreciate it.
Code goes like this-


I got output as-
super static block
static block 10
in main
super constructor
constructor

What I could not understand is.., why there is "super constructor" in second last line. As the code is neither called explicitly or implicitly...
9 years ago