public class Compare {
public static void main(String args[]) {
int x = 10, y;
if(x < 10)
y = 1;
if(x>= 10) y = 2;
System.out.println("y is " + y);
}
}
class example {
int x;
int y;
String name;
public static void main(String args[]) {
example pnt = new example();
System.out.println("pnt is " + pnt.name +
" " + pnt.x + " " + pnt.y);
}
}
// The comments come before the package
package pkg;
import
java.awt.*;
class C{};
package pkg;
import java.awt.*;
class C{};
package pkg1;
package pkg2;
import java.awt.*;
class
C{};
package pkg;
import java.awt.*;
import java.awt.*;
class C{};
import java.awt.*;
package pkg;
class C
{};
class test {
public static void main() {
System.out.println("test");
}
}
class test {
public static void main(String args[]) {
if(args.length > 0)
System.out.println(args.length);
}
}
public class test { public static void main(String args[]) { int i, j; int k = 0; j = 2; k = j = i = 1; System.out.println(k); } }
public class test {
public static void main(String args[]) {
System.out.println(args[0] + " " + args[args.length - 1]);
}
}
public class test {
public static void main(String args[]) {
System.out.println(args[0] + " " + args[args.length]);
}
}
public class test {
public static void main(String args[]) {
System.out.println(args[0] + " " + args.length);
}
}
public class example {
int i = 0;
public static void main(String args[]) {
int i = 1;
i = change_i(i);
System.out.println(i);
}
public static int change_i(int i) {
i = 2;
i *= 2;
return i;
}
}
public class example {
int i = 0;
public static void main(String args[]) {
int i = 1;
change_i(i);
System.out.println(i);
}
public static void change_i(int i) {
i = 2;
i *= 2;
}
}
public class example {
int i[] = {0};
public static void main(String args[]) {
int i[] = {1};
change_i(i);
System.out.println(i[0]);
}
public static void change_i(int i[]) {
i[0] = 2;
i[0] *= 2;
}
}
public class example {
int i[] = {0};
public static void main(String args[]) {
int i[] = {1};
change_i(i);
System.out.println(i[0]);
}
public static void change_i(int i[]) {
int j[] = {2};
i = j;
}
}
pubic class test {
public static void main(String args[]) {
char c;
int i;
c = 'A'; // 1
i = c; //2
c = i + 1; //3
c++; //4
}
}
class test {
public static void main(String args[]) {
int i,j,k,l=0;
k = l++;
j = ++k;
i = j++;
System.out.println(i);
}
}
public static ShortCkt {
public static void main(String args[]) {
int i = 0;
boolean t = true;
boolean f = false, b;
b = (t && ((i++) == 0));
b = (f && ((i+=2) > 0));
System.out.println(i);
}
}
public static ShortCkt {
public static void main(String args[]) {
int i = 0;
boolean t = true;
boolean f = false, b;
b = (t & ((i++) == 0));
b = (f & ((i+=2) > 0));
System.out.println(i);
}
}
public static ShortCkt {
public static void main(String args[]) {
int i = 0;
boolean t = true;
boolean f = false, b;
b = (t || ((i++) == 0));
b = (f || ((i+=2) > 0));
System.out.println(i);
}
}
public static ShortCkt {
public static void main(String args[]) {
int i = 0;
boolean t = true;
boolean f = false, b;
b = (t | ((i++) == 0));
b = (f | ((i+=2) > 0));
System.out.println(i);
}
}
public class test {
public static void main(String args[]) {
byte x = 3;
x = (byte)~x;
System.out.println(x);
}
}
public class test {
public static void main(String args[]) {
int x,y;
x = 3 & 5;
y = 3 | 5;
System.out.println(x + " " + y);
}
}
public class test {
public static void main(String args[]) {
int x,y;
x = 1 & 7;
y = 3 ^ 6;
System.out.println(x + " " + y);
}
}
public class test {
public static void main(String args[]) {
boolean x = true;
int a;
if(x) a = x ? 1: 2;
else a = x ? 3: 4;
System.out.println(a);
}
}
public class test {
public static void main(String args[]) {
boolean x = false;
int a;
if(x) a = x ? 1: 2;
else a = x ? 3: 4;
System.out.println(a);
}
}
public class test {
public static void main(String args[]) {
int x, y;
x = 5 >> 2;
y = x >>> 2;
System.out.println(y);
}
}
public class test {
public static void main(String args[]) {
int x;
x = -3 >> 1;
x = x >>> 2;
x = x << 1;
System.out.println(x);
}
}
public class test {
public static void main(String args[]) {
int i = -1;
i = i >> 1;
System.out.println(i);
}
}
public class example {
public static void main(String args[]) {
int x = 0;
if(x > 0) x = 1;
switch(x) {
case 1: System.out.println(1);
case 0: System.out.println(0);
case 2: System.out.println(2);
break;
case 3: System.out.println(3);
default: System.out.println(4);
break;
}
}
}
public class test {
public static void main(String args[]) {
int x = 0, y = 1, z;
if(x)
z = 0;
else
z = 1;
if(y)
z = 2;
else
z = 3;
System.out.println(z);
}
}
public class test {
public static void main(String args[]) {
for(int i = 0; i < 3; i++)
for(int j = 3; j >= 0; j--) {
if(i == j) continue;
System.out.println(i + " " + j);
}
}
}
}
public class test {
public static void main(String args[]) {
for(int i = 0; i < 3; i++)
for(int j = 3; j <= 0; j--) {
if(i == j) continue;
System.out.println(i + " " + j);
}
}
}
}
public class test {
public static void main(String args[]) {
for(int i = 0; i < 3; i++)
for(int j = 3; j >= 0; j--) {
if(i == j) break;
System.out.println(i + " " + j);
}
}
}
}
public class test {
public static void main(String args[]) {
outer: for(int i = 0; i < 3; i++)
for(int j = 3; j >= 0; j--) {
if(i == j) continue outer;
System.out.println(i + " " + j);
}
}
}
}
public class test {
public static void main(String args[]) {
outer : for(int i = 0; i < 3; i++)
for(int j = 3; j >= 0; j--) {
if(i == j) break outer;
System.out.println(i + " " + j);
}
}
}
}
protected class example {
public static void main(String args[]) {
String test = "abc";
test = test + test;
System.out.println(test);
}
}