Abstract Example

abstract class abs {
	int x, y;
	public abs(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}
	public abs() {
		x = 0;
		y = 0;
	}
	void disp() {
		System.out.println("it is disp in abstract class" + x + y);
	}
	abstract void disp1();
	abstract void disp2();
}
abstract class absderived extends abs {
	abstract void disp3();
	abstract void disp4();
}
public class AbstractDemo1 extends absderived {
	AbstractDemo1() {
	}
	@Override
	void disp3() {
	}
	@Override
	void disp4() {
	}
	@Override
	void disp1() {
	}
	@Override
	void disp2() {
	}
	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