When I use %d it displays question mark ? instead of number
import java.util.Scanner;
public class Comparison {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int x;
int y;
System.out.println("Value of x");
x = input.nextInt();
System.out.println("value of y");
y = input.nextInt();
if (x == y)
System.out.printf("%d=%d%n", x, y);
if (x != y)
System.out.printf("%d not equal %d%n", x, y);
if (x <= y)
System.out.printf("%d x<=y %d%n", x, y);
}
}
This is console below
Value of x
77
value of y
77
??=??
?? x<=y ??