no select-case in jsp?

hi,

another question.  i have different case and want to do things differently.  does java have a select-case or do i have to use long if/else if statements?

mskim100
mskim100Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ldbkuttyConnect With a Mentor Commented:
No need of long if/else statements...use select..case in the usual way as follows:

switch(type)
{

case type1: {
// Actions...
break;
}

case 2: {
//Actions...
break;
}

}

Hope this helps...
0
 
rrzCommented:
If you can use JSTL, then you could use  
<c:choose>, <c:when>, and <c:otherwise>   tags.        
 rrz
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.