Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Speed {
- private int length = 0;
- public int getSpeed () { return length; }
- public void setSpeed (int i) {
- if (i > 0) {
- length = i;
- }
- }
- }
- public class MoreSpeed extends Speed {
- private int length;
- public int incSpeed() {
- return length+1;
- }}
Add Comment
Please, Sign In to add comment