Can we change the boolean value in a class function in java, something like this will not work, since the change is local to the function. How can we make the next variable that has passed the variable outside of the method call?
public void changeboolean(Boolean b) { if( somecondition ) { b=true; } else { b=false; } }
EDIT The code could be:
public String changeboolean(Boolean b,int show) { if( somecondition ) { b=true; show=1; return "verify again"; } else { b=false; show=2; return "Logout"; } show=3; return verifed; }
I'm looking for something like this
b.setvalue(true);
Is it possible?
java
Global warrior
source share