Interface in Java

Source code :

import java.io.*;
interface first
 {
      public void prints();     
      
 }
 class one implements first
 {
 
    public void prints() {
        System.out.print("Aroliant");
    }
      
      
 }
public class Program {
    public static void main(String[] args) {
         
         first obj=new one();
           
             obj.prints();
    }
}
 

Output :

Aroliant

Output :


                

Comments :