L
Leo Smith
Dear All,
I am confused about Abstract Class. I know Abstrac Class is a class
contains > 1 abstract methods. I know Abstract Class can only be used as
a base class and cannot have instances of it.
What I am not clear is: if A is the abstract class, which has two
abstract methods.
public abstract class A
{
public abstract void method_1();
public abstract void method_2();
}
public class B extends A
{
public void method_1() {
//implementation
}
//but not implementing method_2()
}
Is B an abstract class? Can B has objects of its own? My foggy impresion
is that B can have objects of its own. B is not an abstract class either.
Am I correct? Thank you.
I am confused about Abstract Class. I know Abstrac Class is a class
contains > 1 abstract methods. I know Abstract Class can only be used as
a base class and cannot have instances of it.
What I am not clear is: if A is the abstract class, which has two
abstract methods.
public abstract class A
{
public abstract void method_1();
public abstract void method_2();
}
public class B extends A
{
public void method_1() {
//implementation
}
//but not implementing method_2()
}
Is B an abstract class? Can B has objects of its own? My foggy impresion
is that B can have objects of its own. B is not an abstract class either.
Am I correct? Thank you.