What will be the output of the following code when executed?
public class StringTester{
public static void main(String[] args){
String str1=null;
String str2=new String(“null”);
System.out.println(“null”.equals(str1));
System.out.println(“null”.equals(str2));
System.out.println(str1.equals(null));
}
}
false
true
NullPointer Exception
NullPointer Exception
true
true
false
false
false
true
To get all Infosys Certified Java Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee