The classes Pgm1
, Pgm2
and Pgm3
are all pretty normal classes. However the class Pgm4
Extends Pgm2
meaning that Pgm4
is a child class of Pgm2
. Think of this like a zoo simulator program, you may have one class that is called Animal
or something similar, and then a lot of other classes that extend it. Some examples of these classes might me Lion
, Tiger
, Bear
(Oh my) and each of those specific animal classes are animals in the simulator.
The super();
statement (like others have pointed out) calls the constructor of the class that you extend. Finally the p3=p3In;
line assigns a variable inside the Pgm4
class to whatever is passed to the class through the constructor. Hope that helps!