Please refer to the code below
public class Q1 {
static void processorB()
{
System.out.println(" is a boolean Operator.");
}
static Q1 processorA()
{
Q1 q=null;
if (("java").startsWith("null"))
return q;
else
return null;
}
static {
System.out.print("Java".startsWith(""));
}
public static void main(
String[] args) {
processorA().processorB();
}
}
I thought it will print "false is a boolean operator"
but it prints "true is a boolean operator" Why??.
Thanks in advance