This is my main activity:
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
String name = "James";
intent.putExtra("title", name);
MainActivity.this.startActivity(intent);
and this is the second activity:
Intent intent = getIntent();
Bundle bundle = intent.getExtras();
String name = bundle.getString("title");
tv.setText(name);
I know that I can take out the Bundle class and just get the string by intent object. So, in this case there is no need for Bundle class. So what is this class good for in this case? It seems to me it's just a redundant line of code.
In what cases using Bundle is advised for passing variables between classes?