technically, yes that would work. However, that's bad programming practice. The reason is any calling method has no way to access that value. Not to say all side effects are bad, in fact it's quite...
Type: Posts; User: helloworld922
technically, yes that would work. However, that's bad programming practice. The reason is any calling method has no way to access that value. Not to say all side effects are bad, in fact it's quite...
change the System.out.println("The tip should be at least " + tip); to return tip;. Then print out the returned value in your main method.