Interface example

PHOTO EMBED

Wed Jan 10 2024 11:50:24 GMT+0000 (Coordinated Universal Time)

Saved by @E23CSEU1151 #java

import java.util.Scanner;
interface client
{
    void input();
    void output();
}
class raju implements client
{
    String name ; double salary;
    public void input()
    {
        Scanner r = new Scanner(System.in);
        System.out.println("eNTER YOUR NAME");
        name = r.nextLine();
        
        System.out.println("eNTER YOUR sal");
        salary = r.nextDouble();
    }
    public void output()
    {
    System.out.println(name +" "+salary);
    
    }
    public static void main(String[] args){
        client c = new raju();
        c.input();
        c.output();
    }
content_copyCOPY