inheritance - about understanding a java code segment from its design perspective -
i trying understand java-based open source project, has code segment like
protected simplebinarymodel(exampleset exampleset, double threshold) { super(exampleset); this.threshold = threshold; } although can guess how function aim achieve, not quite understand reason of defining function "protected" , defining "exampleset" "super". general advantages of defining them way perspective of oo design?
in addition, doesthis.threshold = threshold; aim achieve?
this not function. it's constructor.
super(exampleset); means base class has constructor exampleset parameter.
and this.threshold = threshold; initialized threshold field of current class value of parameter threshold.
Comments
Post a Comment