• + 0 comments

    import java.io.; import java.util.;

    public class Solution {

    public static void main(String[] args) {
      cycle c = new cycle();
      c.print();
    
      }
    

    }

    class Motorcycle{ public void print(){ System.out.println("Hello I am a motorcycle, I am a cycle with an engine.");

    };
    

    } class cycle extends Motorcycle{ @Override public void print(){ super.print();

    System.out.println("My ancestor is a cycle who is a vehicle with pedals.");
    

    }

    }