[Solved] how can I define static var in android? [closed]


That is just some text that passed to another activity….it’s just an example

In the tutorial they want to show that how to send an extra message to another activity.

You can do it by put an extra message with intent.putExtra(EXTRA_MESSAGE, message); and then in another activity, you can catch it with String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);

EXTRA_MESSAGE here is some label or key to get what you want.

solved how can I define static var in android? [closed]