0

fix error simple in java

https://www.sololearn.com/compiler-playground/cyGh5JhoDZ7y Where is the error fix it, please

18th Oct 2022, 9:20 PM
STOP
STOP - avatar
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(); } }
18th Oct 2022, 11:41 PM
SoloProg
SoloProg - avatar