private double getCompatibilityMeasure(Ch
int r1 = rating;
int r2 = otherRating.getRating();
.........
In rthis section of the code Characteristic otherRating is passed to the function. So otherRating is an object that has been passed during a function call. The flow is getCompatibility-> getCompatibilityMeasure(fo
Like you said you call the otherRating.getRating() method and then assign it to r2 and then peform operations.
Main Topics
Browse All Topics





by: jwentingPosted on 2009-07-31 at 22:25:10ID: 24994211
otherRating is an object reference (like everything in Java that's not a primitive) that's passed into the method by value (like all argument passing in Java, as Java uses pass by value exclusively).