class Bird { static { System.out.print("static1 "); } { System.out.print("init3 "); } public Bird() { System.out.print("Bird "); } static { System.out.print("static2 "); } } public class Falcon extends Bird { Falcon(){ System.out.print("Falcon "); } public static void main(String[] args) { System.out.print("main "); new Falcon(); } }
static {
System.out.print("static1 ");
}
{
System.out.print("init3 ");
public Bird() {
System.out.print("Bird ");
System.out.print("static2 ");
public class Falcon extends Bird {
Falcon(){
System.out.print("Falcon ");
public static void main(String[] args) {
System.out.print("main ");
new Falcon();
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.