0% found this document useful (0 votes)
9 views1 page

Java Abstract Class Example: Car

Uploaded by

Abhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Java Abstract Class Example: Car

Uploaded by

Abhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

abstract class car {

abstract void engine();

void color11(){
[Link]("Black");
}
}

class tata extends car{


void engine() {
[Link]("petrol");
}
}
public class main{
public static void main(String[]args){
tata nexon = new tata();
[Link]();
nexon.color11();

}
}

You might also like