...
 
Commits (3)
class FieldInit {
public int i;
public FieldInit f;
public boolean b;
public static void main(String[] args) {
FieldInit f = new FieldInit();
System.out.println(f.i);
if(!f.b) {
System.out.println(1);
}
if(f.f == null) {
System.out.println(2);
}
}
}
...@@ -6,7 +6,7 @@ class B { ...@@ -6,7 +6,7 @@ class B {
i[x] = (x = x + 1); i[x] = (x = x + 1);
} }
x = -1; x = -1;
while(x < 4) { while(x < 3) {
System.out.println(i[(x = x + 1)]); System.out.println(i[(x = x + 1)]);
} }
......
1
2
3
4
\ No newline at end of file
class Bools {
public boolean b;
public static void main(String[] args) {
Bools b = new Bools();
if(!b.b) {
System.out.println(1);
}
b.b = false || true;
if(!b.b) {
System.out.println(2);
}
b.b = false || false;
if(!b.b) {
System.out.println(3);
}
b.b = true || true;
if(!b.b) {
System.out.println(4);
}
b.b = true || false;
if(!b.b) {
System.out.println(5);
}
b.b = false && true;
if(!b.b) {
System.out.println(6);
}
b.b = true && true;
if(!b.b) {
System.out.println(7);
}
b.b = false && false;
if(!b.b) {
System.out.println(8);
}
b.b = true && false;
if(!b.b) {
System.out.println(9);
}
}
}
class EvaluationOrder {
public int i;
public EvaluationOrder setI(int i) {
this.i = i + 1;
System.out.println(this.i);
return this;}
public static void main(String[] args) {
EvaluationOrder e = new EvaluationOrder();
int[] arr = new int[3];
arr[e.setI(-1).i] = e.setI(e.setI(2).i).i + 4;
System.out.println(arr[0]);
}
}
\ No newline at end of file
class EvaluationOrder {
public int i;
public EvaluationOrder setI(int i) {
this.i = i + 1;
System.out.println(this.i);
return this;}
public static void main(String[] args) {
EvaluationOrder e = new EvaluationOrder();
int[] arr = new int[3];
arr[e.setI(-1).i] = e.setI(e.setI(2).i).i + e.setI(1).i * e.setI(2).i + e.setI(3).i / e.setI(4).i % e.setI(5).i;
System.out.println(arr[0]);
}
}
\ No newline at end of file
class A {
public int i;
public static void main(String[] args) {
A a = new A();
a.i = 0;
System.out.println(a.effect(a).i);
int[] arr = new int[42];
arr[arr[0] = 10] = 42;
System.out.println(arr[0]);
System.out.println(arr[10]);
int x;
arr[x = 11] = x;
System.out.println(arr[11]);
a.effect(a.effect(a.effect(a)));
}
public A effect(A a) {
System.out.println(a.i);
A result = new A();
result.i = a.i + 1;;
return result;
}
}
class If {
public static void main(String[] args) {
boolean b = true;
if (b) {
b = false;
if (b) {
System.out.println(1);
} else {
if (!b) {
if (b) {
System.out.println(2);
} else {
System.out.println(3);
}
} else {
b = true;
if (b) {
System.out.println(4);
} else {
System.out.println(5);
}
}
}
} else {
System.out.println(6);
}
}
}
\ No newline at end of file
class IntMin {
public static void main(String[] args) {
System.out.println(1 / 2);
System.out.println(6 / 3);
System.out.println(-6 / 3);
System.out.println(6 / -3);
System.out.println(-6 / -3);
System.out.println(-2147483648 * -1);
System.out.println(-2147483648 / -1);
}
}
\ No newline at end of file
...@@ -3,6 +3,7 @@ class A { ...@@ -3,6 +3,7 @@ class A {
public int loopy_1() { public int loopy_1() {
int i = 3; int i = 3;
while (i < 5) { return i; } while (i < 5) { return i; }
return 0;
} }
public static void main(String[] args) { public static void main(String[] args) {
......
class SimplePrint {
public static void main(String[] args) {
System.out.println(42);
}
}
\ No newline at end of file
class SimpleWriteFlush {
public static void main(String[] args) {
System.out.write(42);
System.out.flush();
}
}
\ No newline at end of file
class A{}
class Foo {
public static void main(String[] args) {
System.out.flush(new A());
}
}
class TypeA{}
class TypeB{}
class Foo {
public static void main(String[] args) {
TypeA a = new TypeA();
TypeB b = new TypeB();
if (a == b) {
}
}
}
class A{}
class Foo {
public static void main(String[] args) {
System.out.println(new A());
}
}
class Foo {
public static void main(String[] args) {
boolean a = System.in.read();
}
}
class Foo {
public static void main(String[] args) {
int a = System.in.read() + 5;
}
}
class A{}
class Foo {
public static void main(String[] args) {
System.out.write(new A());
}
}