From bb3d02987d4f96534f41cfe04667a233809e2ea6 Mon Sep 17 00:00:00 2001 From: Prabhudeep Singh Date: Fri, 2 Oct 2020 00:16:47 +0530 Subject: [PATCH] Update PROGRAM.txt --- PROGRAM.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PROGRAM.txt b/PROGRAM.txt index 41ebb8f..eddf72d 100644 --- a/PROGRAM.txt +++ b/PROGRAM.txt @@ -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();