make abstract method in java in interface code example
Example 1: abstract classes and interfaces in java
abstract class have no implementation of methods functions inside it. the classes which extending abstract class have to implement it
Example 2: how to create an abstract method in java
abstract class Scratch{
// cannot be static
abstract public void hello();
abstract String randNum();
}
interface Other{
//all methods in an interface are abstract
public void bye();
String randDouble();
}