主题:谁能正确的解释这段小程序的输出结果???
public class SequenceTest extends Test1{
{
System.out.print("1");
}
SequenceTest(){
System.out.print("2");
}
static{
System.out.print("3");
}
{
System.out.print("4");
}
public static void main(String[] args) {
new SequenceTest();
}
}
class Test1 {
Test1(){
System.out.print("5");
}
static{
System.out.print("6");
}
}
{
System.out.print("1");
}
SequenceTest(){
System.out.print("2");
}
static{
System.out.print("3");
}
{
System.out.print("4");
}
public static void main(String[] args) {
new SequenceTest();
}
}
class Test1 {
Test1(){
System.out.print("5");
}
static{
System.out.print("6");
}
}