Skip to content
Example1.java 517 B
Newer Older
Javier Costa's avatar
Javier Costa committed
package tfm.programs;

public class Example1 {

    public static void main(String[] args) {
        int x = 1;
        int y = 2;

        if (x < y) {
            while (x < y) {
                x++;
            }

            y = x + 1;
        } else {
            x = 4;
            y *= x;
        }

Javier Costa's avatar
Javier Costa committed
        int e = (Integer) x;

        switch (x) {
            case 1:
                e = 2;
                break;
            case 2:
                e = 3;
        }

Javier Costa's avatar
Javier Costa committed
        System.out.println(y);
    }
}