I am basically asking about the difference between these two approaches:
public class MyClass extends AppCompatActivity {
private ObjectType mObject = new ObjectType();
@Override
protected void onCreate(Bundle savedInstanceState) {
// do stuff with mObject
and
public class MyClass extends AppCompatActivity {
private ObjectType mObject;
@Override
protected void onCreate(Bundle savedInstanceState) {
mObject = new ObjectType();
I hope I'm being clear enough. I am struggling to understand when we'd want to choose one versus the other.