Switch case + condition??

Switch case + condition??

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 Tutorials/Questions & Answers:
Conditional Examples(if - else- switch case) in JavaScript
PHP Conditional Statement
Advertisements
JavaScript Conditional Statements
ModuleNotFoundError: No module named 'django-conditioner'
ModuleNotFoundError: No module named 'conditioned-profile'
C Break with Switch statement
cONDITIONAL STATEMENT
endif to end the conditional statement.
conditional statement in java
ModuleNotFoundError: No module named 'conditional'
Explain the ternary conditional operator in PHP?
ModuleNotFoundError: No module named 'ec2_tag_conditional'
ModuleNotFoundError: No module named 'djangocms-conditional'
ModuleNotFoundError: No module named 'flask-conditional'
ModuleNotFoundError: No module named 'ec2_tag_conditional'
Conditional (Logical) Operators
Conditional Statement in Turbo C
Conditional Statement in Turbo C
Conditional increment in xslt
Conditional increment in xslt
Conditional increment in xslt
Conditional operator in java
ModuleNotFoundError: No module named 'odoo12-addon-base-conditional-image'
ModuleNotFoundError: No module named 'coverage-conditional-plugin'
ModuleNotFoundError: No module named 'django-conditional-aggregates'
ModuleNotFoundError: No module named 'django-conditional-views'
IF-Else Conditional Statement
When are you supposed to use endif to end the conditional statement?
MySQL Case
Conditional Test
MySQL Case In Where Clause
Implementing Conditional Content on a JSP Page
Identify correct and incorrect conditional expressions, BETWEEN expressions, IN expressions, LIKE expressions, and comparison expressions.
This is Conditional Forward using EL
how i conditional access the data from database using combo box. - JSP-Servlet
PHP Control Statement
java code for print true if even and false if odd and print error if any float value with out using conditional and looping statement
Conditional Forward using EL
Conditional Include with <c:if>
Java 'or' operator
IF - PHP If and else Statement
Operators; If, Else, Elseif; Loops
Java Questionmark operator
Java Tutorial
Use if statement with LOOP statement
C Break for loop
Struts Logic Tags: An Introduction
JSP IF Statement
Struts Logic Tags
SQL Aggregate Functions In Where Clause

Ads