For this Question: You are given three distinct positive integers, A, B and C, in the input. Your task is to find their median. 

The median of a set of integers is the number at the middle position if they are arranged in ascending order.The input consists of a single line containing three integers A, B and C.

<b> Constraints: </b>
1 ≤ A, B, C ≤ 10<sup>9</sup>
A, B, C are pairwise distinct.
Print a single integer, the median of the given numbers.Sample Input 1:
5 1 3

Sample Output 1:
3

Sample Input 2:
1 2 3

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



class Main {
	public static void main (String[] args) {

			try{
			InputStreamReader r=new InputStreamReader(System.in);
			BufferedReader in = new BufferedReader(r);
			String a = in.readLine();
			String[] nums = a.split(" ");
			long[] l = new long[3];
			for(int i=0; i<3; i++){
				l[i] = Long.parseLong(nums[i]);
			}

			Arrays.sort(l);
			System.out.print(l[1]);

			}
			catch(Exception e){
				System.out.println(e);
			}

	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?