You can have any number of statements under if, else if or else. Just treat the if inside another if (in nesting) as other statements of if. Once the compiler will enter into any if then the statements indise it will be executed and if it contains any other if inside itself then the condition of that if is checked and then executed if found true.
Please ask if you want any further clarifications.