Skip to content
Example1.java 1.15 KiB
Newer Older
Javier Costa's avatar
Javier Costa committed
package tfm.programs.pdg;
Javier Costa's avatar
Javier Costa committed
import java.util.Arrays;

Javier Costa's avatar
Javier Costa committed
public class Example1 {

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

Javier Costa's avatar
Javier Costa committed
        if (x < y) {
Javier Costa's avatar
Javier Costa committed
            while (x < y) {
Javier Costa's avatar
Javier Costa committed
                y = x;

Javier Costa's avatar
Javier Costa committed
                for(int i=0; i < y; i++) {
                    y += i;
Javier Costa's avatar
Javier Costa committed
                    if (x > y)
                        continue;
Javier Costa's avatar
Javier Costa committed
                    x = y;

//                    while (x > 1) {
//                        y += 12;
//                        x = y;
//                    }
Javier Costa's avatar
Javier Costa committed
                }
Javier Costa's avatar
Javier Costa committed

Javier Costa's avatar
Javier Costa committed
            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;

                while (1 < 4) {
                    y = 2;

                    if (4 < 1) {
                        break;
                    }
                }

                e = 5;

                break;
            case 2:
                e = 3;
            case 3:
                e = 4;
                break;
            default:
        }

        Logger.log(e);