/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// Vergleichsoperatoren
int value1 = 1;
int value2 = 2;
if(value1 == value2)
System.
out.
println("value1 == value2"); if(value1 != value2)
System.
out.
println("value1 != value2"); if(value1 > value2)
System.
out.
println("value1 > value2"); if(value1 < value2)
System.
out.
println("value1 < value2"); if(value1 <= value2)
System.
out.
println("value1 <= value2");
// Logische
if((value1 == 1) && (value2 == 2))
System.
out.
println("value1 is 1 AND value2 is 2"); if((value1 == 1) || (value2 == 1))
System.
out.
println("value1 is 1 OR value2 is 1");
// Bitoperatoren
int bitmask = 0x000F;
int val = 0x2222;
// prints "2"
System.
out.
println(val
& bitmask
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCS8vIFZlcmdsZWljaHNvcGVyYXRvcmVuCiAgICAgICAgaW50IHZhbHVlMSA9IDE7CiAgICAgICAgaW50IHZhbHVlMiA9IDI7CiAgICAgICAgaWYodmFsdWUxID09IHZhbHVlMikKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJ2YWx1ZTEgPT0gdmFsdWUyIik7CiAgICAgICAgaWYodmFsdWUxICE9IHZhbHVlMikKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJ2YWx1ZTEgIT0gdmFsdWUyIik7CiAgICAgICAgaWYodmFsdWUxID4gdmFsdWUyKQogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oInZhbHVlMSA+IHZhbHVlMiIpOwogICAgICAgIGlmKHZhbHVlMSA8IHZhbHVlMikKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJ2YWx1ZTEgPCB2YWx1ZTIiKTsKICAgICAgICBpZih2YWx1ZTEgPD0gdmFsdWUyKQogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oInZhbHVlMSA8PSB2YWx1ZTIiKTsKICAgICAgICAgICAgCiAgICAgICAgLy8gTG9naXNjaGUKICAgICAgICBpZigodmFsdWUxID09IDEpICYmICh2YWx1ZTIgPT0gMikpCiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigidmFsdWUxIGlzIDEgQU5EIHZhbHVlMiBpcyAyIik7CiAgICAgICAgaWYoKHZhbHVlMSA9PSAxKSB8fCAodmFsdWUyID09IDEpKQogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oInZhbHVlMSBpcyAxIE9SIHZhbHVlMiBpcyAxIik7CiAgICAgICAgICAgCiAgICAgICAgLy8gQml0b3BlcmF0b3JlbgogICAgICAgIGludCBiaXRtYXNrID0gMHgwMDBGOwogICAgICAgIGludCB2YWwgPSAweDIyMjI7CiAgICAgICAgLy8gcHJpbnRzICIyIgogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbih2YWwgJiBiaXRtYXNrKTsKICAgIH0KfQ==