Main method and Static block Execution in java

Main method and Static block Execution in java
SOURCE : UsingList.java

public class MainWithStatic {

public static void main(String[] args) {

System.out.println("iam in main");
}

static {
System.out.println("iam in static");
}

}


INPUT




OUTPUT

iam in static
iam in main








Sandeep Kumar D

Hi, I have written and developed this post so that most of people will be benefited. I'm committed to provide easy and in-depth tutorials on various technologies.I hope it will help you a lot.

- Sandeep Kumar D

Follow Me @Google+




SHARE

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment