/******************************************************************************
*  Example of a nested if 
*  Notice if used without parenthesis, && will execute before ||                        
******************************************************************************/
public class If 
{
    public static void main(String[] args) 
    {
        int Midterm    = 92;
        int Final      = 93;
        int spcProject = 85;

        if ( Midterm >= 90 || Final >= 90  && spcProject >= 90 )        //if coded like this --> A  
//      if ((Midterm >= 90 || Final >= 90) && spcProject >= 90 )        //if coded like this --> B  
            System.out.println("Your grade is 'A'");
        else
        {
            if ( Midterm >= 80 || Final >= 80  &&  spcProject >= 80 )  
                System.out.println("Your grade is 'B'");
            else 
                System.out.println("You could have done better");
        }
    }
}