Step thru your code line by line and play computer. See when each println is called and with what values. When a method is called as an argument to another method, the called method executes first...
Type: Posts; User: Norm
Step thru your code line by line and play computer. See when each println is called and with what values. When a method is called as an argument to another method, the called method executes first...
You code does double printing. The displayIt methods print things AND return data that is printed by the caller. You need to figure where you want the data printed and only print it there. Only do...
Instead of passing the call to displayIt to println, call displayIt directly. The displayIt method calls println to do the printing.
Don't work about saving a few bytes of memory. Using int can be...