int a;
static int a;
Both takes same memory
I just came by this today and i don't know the use of doing so ::
private static final float INDICATOR_RADIUS = 1.0f;
this is same as
private final float INDICATOR_RADIUS = 1.0f;
I'm not getting why they(http://developer.samsung.com/android/samples/Golf) did so?They used this many times
int a;
static int a;
Both takes same memory
No, they don't. The first takes up four bytes per instance of your class. The second takes up four bytes, whether there are 0 instances or 100 instances. The field is related to the type, not to any particular instance of the type.
See more on this question at Stackoverflow