interface cars{
String CarName=null;
int CarModelNo=0;
public void display();
}
public class InterFaceExample implements cars{
String CarName="Maruti";
@Override
public void display() {
// TODO Auto-generated method stub
System.out.println("Car Name :"+CarName);
}
public static void main(String Dx[])
{
InterFaceExample IntEx=new InterFaceExample();
IntEx.display();
}
}
String CarName=null;
int CarModelNo=0;
public void display();
}
public class InterFaceExample implements cars{
String CarName="Maruti";
@Override
public void display() {
// TODO Auto-generated method stub
System.out.println("Car Name :"+CarName);
}
public static void main(String Dx[])
{
InterFaceExample IntEx=new InterFaceExample();
IntEx.display();
}
}
No comments:
Post a Comment