For this Question: Given a string s, find the length of the longest substring without repeating characters.

<b>Note</b> : String contains spaces also.First Line contains the input of the string.

<b> Constraints </b>
1 <= string.length <= 50000
s consists of English letters, digits, symbols, and spaces.Print the length of the longest substring without repeating characters.Sample Input: 
abcabcbb

Sample Output:
3

Explanation: The answer is "abc", with a length of 3., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main(String args[])throws IOException
    {
        BufferedReader read = new BufferedReader(new InputStreamReader(System.in));


        {
            String s = read.readLine().trim();

            Solution ob = new Solution();
            System.out.println(ob.longestUniqueSubsttr(s));
        }
    }
}

class Solution{
    int longestUniqueSubsttr(String str){
        int maxans = Integer.MIN_VALUE;
        Set < Character > set = new HashSet < > ();
        int l = 0;
        for (int r = 0; r < str.length(); r++)
        {
            if (set.contains(str.charAt(r)))
            {
                while (l < r && set.contains(str.charAt(r))) {
                    set.remove(str.charAt(l));
                    l++;
                }
            }
            set.add(str.charAt(r));
            maxans = Math.max(maxans, r - l + 1);
        }
        return maxans;
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?