public class Operators {
    public static void main(String[] args) {
        // Primitive data types in Java
        boolean b1 = true, b2 = false;
        char c1 = 'F', c2 = 'O';
        byte byte1 = 0x32; // Bytes tipicamente en hexadecimal
        short s1 = 1;
        int i1 = 2, i2 = -7;
        long l1 = 100, l2 = 10L; // 10l pareceria 101
        float f1 = 3.14f, f2 = 10.1f;  // f/F obligatoriamente
        double d1 = 3.14159265358979323846, d2 = 5.5d;
            // Usemos double en lugar de float
        // All operators are like in C
        System.out.println(b1 + " && " + b2 + " = " + (b1 && b2));
        // Descomentar para ver los errores:
        // System.out.println(b1 + " && " + b2 + " = " + b1 && b2); // ERR
        // No compila: bad operand types for &&: String && boolean
        // System.out.println(i1 + " && " + i2 + " = " + (i1 && i2)); // ERR
        // No compila: bad operand types for &&: int && int
        if (c1 >= 'A' && c1 <= 'Z') {
            System.out.println("'" + c1 + "' es mayusculas.");
        } else if (c1 >= 'a' && c1 <= 'z') {
            System.out.println("'" + c1 + "' es minusculas.");
        } else {
            System.out.println("'" + c1 + "' no se que es.");
        }
        System.out.println(i1 + " * " + i2 + " = " + i1 * i2);
        // ^- Va bien porque * tiene mas prioridad que + ! X-DDD
        System.out.println(i1 + " + " + i2 + " = " + i1 + i2);
        System.out.println("(" + i1 + " + " + i2 + ") = " + (i1 + i2));
    }
}
