abstract class NewCars{
String CarsName=null;
public void display(String CN)
{
this.CarsName=CN;
System.out.println("CarName :"+CarsName);
}
}
public class AbstractionExample extends NewCars{
public static void main(String Dx[])
{
AbstractionExample absEx=new AbstractionExample();
absEx.display("New i30");
}
}
String CarsName=null;
public void display(String CN)
{
this.CarsName=CN;
System.out.println("CarName :"+CarsName);
}
}
public class AbstractionExample extends NewCars{
public static void main(String Dx[])
{
AbstractionExample absEx=new AbstractionExample();
absEx.display("New i30");
}
}
No comments:
Post a Comment