Steve Luke wrote:Are you asking if more memory is consumed by holding the value returned from a method (boolean bool = getABoolean();) versus not holding the value returned from the method (getABoolean();)?
If the answer is yes, the amount of memory being 'saved' would be so inconsequential as to not be worth thinking about. If you need the returned value, store it in a variable. If you don't care about the returned value and just call the method for another affect, then don't store the returned value in a variable. But the memory consideration shouldn't come into the picture.
I understand that the amount of memory consumed will be too small/insignificant. I was interested in knowing if there would be a difference, no matter how small.