extending classes java code example
Example 1: java how to extend a class
class A{
//some code
}
class B extends A{ //keyword used is extends
//some code
}
Example 2: public class extends java super
public MountainBike(int startHeight,
int startCadence,
int startSpeed,
int startGear) {
super(startCadence, startSpeed, startGear);
seatHeight = startHeight;
}