0
I’m trying to display a value in a Toast which is in a string, in another java file, only the error onCreate does not allow the value is undegistenting someone take a look at me Mainactivity.java
public class testes extends Activity
{
public static void main(String[] args) {
JASONRead n = new JASONRead();
n.lerJson();
}
@Override
protected void onCreate(Bundle savedIntanceState) {
super.onCreate(savedIntanceState);
setContentView(R.layout.json);
n = this.lerJson();
Toast.makeText(this, (n), Toast.LENGTH_SHORT).show();
}
I want to display the value that is in (n) only it appears no value, but it has a value only that I cannot call the same.
– Matheus Martin