抽象类必须要有抽象方法吗?

版权声明:转载请注名出处 https://blog.csdn.net/meism5/article/details/89377407

抽象类必须要有抽象方法吗?

不一定。如

public abstract class TestAbstractClass {

	public static void notAbstractMethod() {
		System.out.println("I am not a abstract method.");
	}
	
}

猜你喜欢

转载自blog.csdn.net/meism5/article/details/89377407