lundi 22 août 2016

How to make multiple if statments

I'm using java and I want to make more than 50 if conditions when I make it like normal way like this

If (-------- == --------){//dosomething};

Else If (-------- == --------){//dosomething};

Else If (-------- == --------){//dosomething};

Else If (-------- == --------){//dosomething};

Else If (-------- == --------){//dosomething};

Else {//dosomething};

But only the first condition works and the rest of conditions don't work Sometimes it gives me error " Eof "

I tried also this style

If (-------- == --------){//dosomething};

Else {//dosomething} ;

If (-------- == --------){//dosomething};
Else {//dosomething} ;


If (-------- == --------){//dosomething};
Else {//dosomething} ;

It also didn't works only the first if condition works

Note there is one time the gui didn't show the buttons or labels

How could I answer this how could I write many if conditions

Aucun commentaire:

Enregistrer un commentaire