Initialization problem

xiaoxiao2021-03-06  71

I saw this example on 9CBS, I would like to ask this part of the red, nothing, only in a middle bracket, what does this mean! ! Public class test2 extends test1 {{system.out.print ("1");}

TEST2 () {system.out.print ("2");

Static {system.out.print ("3");

{System.out.print ("4");

Public static void main (string [] args) {new test2 ();}}

Class test1 {{stem.out.print ("7");

TEST1 () {system.out.print ("5");

Static {system.out.print ("6");}}

转载请注明原文地址:https://www.9cbs.com/read-91801.html

New Post(0)