I have seen some Intent
declarations on Youtube, Stack Overflow and elsewhere, and I have found two types of Intent
declarations.
First type :
Intent intent = new Intent(FirstActivity.this, SecondActivity.class);
startActivity(intent);
Second type :
startActivity(new Intent(FirstActivity.this, SecondActivity.class));
My question is which is the better way to declare Intent
? Is there any significant difference between the two declarations?