adplus-dvertising
frame-decoration

Question

Which is a valid declarations of a String?

a.

String s1 = null;

b.

String s2 = 'null';

c.

String s3 = (String) 'abc';

d.

String s4 = (String) '\ufeed';

Posted under Java Programming

Answer: (a).String s1 = null;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which is a valid declarations of a String?