hi, why is it that i can't use if statement on my WholeString Variable? but when i use Println it contains the "[" value?, line is a string variable where value is from input.readline() statement, i can't execute the statement inside if statement, thank you very much
String MySam;
MySam = line;
WholeString = MySam.substring(0,1);
System.out.println(WholeString);
if (WholeString == "[") {
System.out.println("Execute this");
}
String MySam;
MySam = line;
WholeString = MySam.substring(0,1);
System.out.println(WholeString);
if (WholeString == "[") {
System.out.println("Execute this");
}