Jump to content

else if ( if (


funbinod

Recommended Posts

It's hard to tell what you mean.

 

If you want to check for two conditions:

} else if(condition1 && condition2) {

You can have if statements inside other if statement blocks, but if you can reduce it to a logical operation in a single condition it's better:

} else if(condition1) {    // Some code    if(condition2) {        // . . .    }}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...