I'm writing a code to check for balanced brackets but I'm having a problem, probably with Java syntax. In the following code:
String s0 = "{{[[(()[])]{()}]}}}";
String[] s1 = s0.split("");
if (s1[0] == "{")
System.out.println("Ok");
else
System.out.println("Nope");
Why the comparison
s1[0] == "{"
is not true?