I\'m a beginner and I\'ve always read that it\'s bad to repeat code. However, it seems that in order to not do so, you would have to have extra method calls usually. Let\'s
The best practice is to measure twice and cut once.
Once you've wasted time optimization, you can never get it back again! (So measure it first and ask yourself if it's worth optimisation. How much actual time will you save?)
In this case, the Java VM is probably already doing the optimization you are talking about.