
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!!
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.