Fragmented · November 20, 2015

022: Effective Java for Android developers : Item 5

In this mini Fragment, we introduce Joshua's fifth Item: Avoid creating unnecessary objects.

Stay tuned for more items from our "Effective Java for Android developers" Fragment series.

Show Notes

Avoid creating unnecessary objects

Snippet to demonstrate AutoBoxing problems

// sum of all positive values
Long sum = 0L;
for (long i=0; i Integer.MAX_VALUE; i++) {


Copyright 2024 Spec Network, Inc.