IfElseIf.java [Questions]


#1

Decided to redo using the same method because I stumbled across an error that I don't udnerstand.
Any explanation?

    public class IfElseIf {
    	public static void main(String[] args) {
    
    			int gasTank = 40;
        if (!(gasTank > 12)) {
           System.out.println("Gas is running lowing, please go to the nearest gas station.");
        } else if (gasTank >= 30); {
          System.out.println("You still have a good amount of gas in the tank"); 
        } else { 
          System.out.println("Error : Gas analysis has failed, please try again");
       
    		}	
	}
}

Error : IfElseIf.java:9: error: 'else' without 'if'
    } else { 
      ^
1 error

#2

that line should be

else if (gasTank >= 30) {//no semi colon