0
fix error simple in java
https://www.sololearn.com/compiler-playground/cyGh5JhoDZ7y Where is the error fix it, please
1 Answer
+ 4
interface Person {
public void Display(); // interface method (does not have a body)
}
// Student "implements" the Person interface
class Student implements Person {
public void Display()
{
// The body of Display() is provided here
System.out.println("This is a Student");
}
}
class MainClass {
public static void main(String[] args) {
Student S1 = new Student(); // Create a Student object
S1.Display();
}
}