\'m developing an Android Application in which I have
I\'ve two classes class A and Class B .
In class A , I tried the code Snippets like below,
You should not create an instance of the activity class. It is wrong. Activity has ui and lifecycle and activity is started by startActivity(intent)
You can use startActivityForResult or you can pass the values from one activity to another using intents and do what is required. But it depends on what you intend to do in the method.