Static Method

public class A {
	static void disp1(int x[]) {
		for (int x1 : x)
			System.out.println(x1);
	}
	static void disp2(char c, int... x) {
		for (int x1 : x)
			System.out.println(x1);
	}
	public static void main(String[] args) {
		int a[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
		disp2('a', a);
	}
}

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