Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions PROGRAM.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ class BiCycle{
}

class MotorCycle extends BiCycle{

String define_me(){
return "a cycle with an engine.";
}

MotorCycle(){
System.out.println("Hello I am a motorcycle, I am "+ define_me());
// super.define_me(){
// return "a vehicle with pedals.";
//}
super.define_me();
// super.define_me(){
// return "a vehicle with pedals.";

super.define_me();
String temp="a vehicle with pedals."; //Fix this line

System.out.println("My ancestor is a cycle who is "+ temp );
}

}

class Solution{
public static void main(String []args){
MotorCycle M=new MotorCycle();
Expand Down