I believe that I am having trouble understanding how to give a signature of a method in Java. For example, if my code was:
public void addOn(Fraction other) {
number = other.denominator * number + other.numerator * denominator;
denominator = denominator * other.denominator;
and I had to give the signature of the method addOn();
Would the signature for this method simply be addOn(Fraction);?
That really depends on the level of "accuracy" that you need.
When you informally talk to you coworker, then the "signature" would probably contain all information that a human being might find interesting:
Whereas, when you come from a compiler-constructor or maybe JVM compiler point of view, the answer is different; in that case, only items 2, and 3 do matter; anything else is not part of the signature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With