Java Program using abstract class and method
In this program, You will learn how to implement abstract class and method in java.
abstract class First {
abstract void msg();
}
Example: How to implement abstract class and method in java.
abstract class First {
abstract void msg();
}
class Main extends First {
void msg() {
System.out.println("msg is called here");
}
public static void main(String args[]) {
Main st = new Main();
st.msg();
}
}
Output:
msg is called here