Search:

Type: Posts; User: Cornix

Search: Search took 0.07 seconds.

  1. Replies
    5
    Views
    1,287

    Re: Beginner's question about inheritance

    Yes exactly. The new class Car will have 2 different attributes which are both called speed.
  2. Replies
    5
    Views
    1,287

    Re: Beginner's question about inheritance

    This is a tricky question.
    If you look at this example Code:

    public class Vehicle {

    protected int speed;

    public int getSpeed() {
    return speed;
    }
Results 1 to 2 of 2