Where NPE may occur

Report a typo

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");
Select one option from the list
___

Create a free account to access the full topic