package com.mastermoin.java;
public class DemoRun {
static
{
System.out.println("----static
block @ start----");
}
public static void main(String[] args) {
System.out.println("----begin----");
}
static
{
System.out.println("----static
block @ end----");
}
}
----static block @ start----
----static block @ end----
----begin----
All static block[s] is/are executed first and than after main method executed step by step
No comments:
Post a Comment