Home Answers Viewqa Java-Beginners Switch case + condition??

 
 


Mimy Ira Clenny
Switch case + condition??
0 Answer(s)      2 years and 7 months ago
Posted in : Java Beginners

I try to use a switch case with condition but it doesn't display anything have look:

......public void commandAction(Command c, Displayable d) { String label = c.getLabel(); if (label.equals("Exit")) { destroyApp(true); } if (label.equals("Back")) { { // go back to menu Menu(); }

  }

else { List down = (List)display.getCurrent(); switch(down.getSelectedIndex()) { case 0: Tambo(); if( label.equals("Buy")){ buy( ); }else if ( label.equals("Sell")){ sell( ); } else if(label.equals("Search")){ search();} break; case 1: Nyqeni(); if( label.equals("Buy")){ buy( ); }else if ( label.equals("Sell")){ sell( ); } else if(label.equals("Search")){ search();} break;.....

I need a help!!

View Answers









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.