java can i create a private abstract method code example
Example 1: how to create an abstract method in java
abstract class Scratch{
abstract public void hello();
abstract String randNum();
}
interface Other{
public void bye();
String randDouble();
}
Example 2: how to use an abstract class in java
interface methods{
public void hey();
public void bye();
}
abstract class other implements methods{
public void hey(){
System.out.println("Hey");
}
}
class scratch implements methods {
public void hey(){
System.out.println("Hey");
}
public void bye() {
System.out.println("Hey");
}
}