This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Your Super class- Vehicle has the constructor which takes- three parameters. But in the sub class constructor- SportsCar you are calling super(<parameter>), but as you would see- the Vehicle would be expecting: super(param1,param2,param3).
Java provides a default- no-arg constructor if the constructor is not overloaded in the class. But if the constructor is overloaded- the programmer would have to specify the no-arg constructor- something like:
Now coming to initializing the fields for the class- You can pass it in the constructor- while creating the instance or use the setters to set those values.
If you want to set a particular value for a particular variable for all the instances of the class- You would have to declare the variable/field as Static- Something like