Let suppose I have a method
public int dummy(){
return 1;
}
and if I call this method by
dummy();
not
int a = dummy();
will it make any difference? why?
No, it wouldn't make any difference. We call a ton of methods from the JDK ignoring their outputs - List's .remove(int index)
removes the element at a given index, and returns what element was removed. It is normal to ignore it and move ahead.
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