jeudi 7 mai 2015

Is it possible to do 2 things in if statement on java android?

I have an if statement in my android code. I want to do two things on if statement. Is it possible to do that?
For example :

if (a == true)
return b;
button.setVisibility(View.INVISIBLE);

I did that code, there is no error. But when i ran my apps, it stops unfortunately. Why did it become like that? Should i do another logic? Anyone could help me? Thank you.

Aucun commentaire:

Enregistrer un commentaire