abstract mtehod
abstract method- abstract class and Interface can contains abstract method.
- abstract method will not have method body.
- abstract method will be implemented in sub class of abstract class.
- abstract method ends with semicolon.
abstract returntype methodName(parameters);
Example
abstract void withDraw(int a);
{
public void method1()
{
System.out.println("this is method1 which is implemented")
}
public abstract void method2();
}
Thanks for your time.
- Example basic structure to understand.
{
public void method1()
{
System.out.println("this is method1 which is implemented")
}
public abstract void method2();
}
Thanks for your time.
Nireekshan