Comparing two integers inputted by user

Report a typo

In Java, write a program that reads two integer values from the user and compares them. If the first number is greater than the second, print "TRUE", else print "FALSE". You should first scan an integer 'a' and then scan an integer 'b'.

Sample Input 1:

5
3

Sample Output 1:

TRUE

Sample Input 2:

2
4

Sample Output 2:

FALSE
Write a program in Java 17
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
// Create a Scanner to read input from the user.
Scanner sc = new Scanner(System.in);

// Read two integer values from the user.
int a = sc.nextInt();
int b = sc.nextInt();

// Compare the two values and print the result.
// ADD YOUR CODE HERE
}
}
___

Create a free account to access the full topic