int x = 3; char y = '3'; if(Character.getNumericValue(y) == x) { System.out.println("the if statment would print this"); }