[Solved] Pass integer between classes in Java [duplicate]


in class A:

Intent myIntent = new Intent(classA.this, classB.class);
myIntent.putExtra("number", maxpluseen)
            classA.this.startActivity(myIntent); 

in Class B:

int getal;
getal = getIntent().getExtras().getInt("number");

……

solved Pass integer between classes in Java [duplicate]