Comparing two integer values

Report a typo

In the provided Java code, fill in the blanks to define an integer a with a value of 10 and a boolean result to compare if a is less than another integer b valued 20. The result of this comparison should then be printed out.

Fill in the gaps with the relevant elements
public class Main {
    public static void main(String[] args) {
         a = 10;
        int b = 20;
         result = a < b;
        System.out.println("Is a less than b? " + result);
    }
}
intboolean
___

Create a free account to access the full topic