Posts Tagged Memory
Be aware: Constants get inlined at compile time
Most books tell you that new String(“value”) should not be used since it creates two objects although only one is needed. But what the books almost never tell you is that there is one case in which you should use it: Java constants aka “public static final”. Read the rest of this entry »
Recent Comments