Suppose you have a variable named s of the String type.
In which cases NPE may occur?
a)
String str = null;
s = str;
b)
String result = s.concat("100");
c)
"abc".equals(s);
d)
s.equals("abc");Suppose you have a variable named s of the String type.
In which cases NPE may occur?
a)
String str = null;
s = str;
b)
String result = s.concat("100");
c)
"abc".equals(s);
d)
s.equals("abc");Create a free account to access the full topic