Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Mimy Ira Clenny
Switch case + condition??
0 Answer(s)      3 years and 11 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!!


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com