We would like to know how to convert string to integer.
//from ww w.j av a 2 s . c om class Main { public static void main(String[] args) { int x, y; x = Integer.parseInt("1"); y = Integer.parseInt("2"); if (x > y) { System.out.println(x + " + y); } else if (x < y) { System.out.println(x + "<" + y); } else { System.out.println(x + "=" + y); } } }