Strona 1 z 1

[java] problem z kompilacja

: 13 sty 2015, o 22:06
autor: jabluszko

Kod: Zaznacz cały

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Czesc2;

/**
 *
 * @author Z710
 */
public class IfElse {
    public static void main(String[] args){
        
        int a = 23;
        int b = 13;
        
        if(a>b){
            System.out.println(a);
            System.out.println(b);
        }
       else {
            System.out.println(b);
            System.out.println(a);
        }    
       else if(a==b)
            System.out.println(a);
}
    
}
co jest nie w porzadku? blad wyrzuca mi przy else if(a==b). tresc : 'else' without 'if'

[java] problem z kompilacja

: 13 sty 2015, o 22:11
autor: WarNaX
Zmień kolejność, bo "else if" masz na końcu