For this Question: You are given two non-negative integers, A and B. You are required to print the smallest non-negative integer such that it is not equal to both A and B.The input consists of two space separated integers A and B.

Constraints:
0 &le; A &le; 10
0 &le; B &le; 10
A &ne; B
Print a single integer denoting the answer.Sample Input 1:
0 1

Sample Output 1:
2

Sample Input 2:
4 5

Sample Output 2:
0, I have written this Solution Code: import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        Set<Integer> set=new HashSet<>();
        String s[]=bu.readLine().split(" ");
        for(String x:s) set.add(Integer.parseInt(x));

        int mex=0;
        while(set.contains(mex)) mex++;
        System.out.println(mex);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?