obstract class
We can use the keyword abstract to make any class abstract. We can use similarities to create objects drawing from same abstract super class.
package Pack1;
abstract class my_abstract5 {
void my_test() {}
public static void main(String args[])
{
my_abstract5 obj1 = new my_next();
obj1.my_test();
}
}
class my_next extends my_abstract5 {
void my_test() {
System.out.println("Cricket ...");
}
}
Output is here
Cricket ...
« Java
This article is written by plus2net.com team.
plus2net.com