Static Block

public class StaticBlock {
	int y = 10;
	static {
		System.out.println("This is static block");
		System.out.println("This is static block");
		System.out.println("This is static block");
	}
	public static void main(String[] args) {
	}
}

Download

Access modifiers in Java

Complete abstract Example
Complete final Example
Static Block
Static variable
Static method


Write your Comment

Name :
Email Id : [ We will not publish your email id ]
Your Comment : [ Maximum 200 chars ]
Enter Security code