Hi singh,
Please try to write up the correct code next time... there are way too many typos... Also make sure you use
Java style curly braces for classes, methods , and code blocks.
Anyway, assuming I can guess the missing characters the following should answer your questions:
on 1: The subclass is simply calling the super classes constructor which is
Since List<Car> IS-A list you may pass it.
on 2: The subclass is simply calling the super classes implementation of the getRental() method. If you omit the "super" part you will find yourself in an infinite loop because the getRental() method in CarRental will call itself over and over and over again.
on 3: exactly the same as #2.
on 4: exactly the same as #2 & #3.
If you're familiar with c#, for example, then
super is identical to c#'s
base.
I would like to point out once more that your code is really bad.
You should use an
IDE (like eclipse) to format, debug, run, and
test your code before submitting it to this forum in the future.
hope that helped.