The question is slightly stupid, just interesting, it is clear that no one does this, but still - will it eat resources, etc?
For example, there is such a method
public String getName(){ return name; } And I call it somewhere like this, without saving to a variable
getName(); It should be so.
String s = getName(); : D Yes, it turned out very silly, but still. What happens to a value if it hasn't gone anywhere?