Solved

If You Want to Store the Value "Harry Potter" in the String

Question 51

Multiple Choice

If you want to store the value "Harry Potter" in the String variable name, which of the following statements could you use?


A) String name = "Harry Potter";
B) String name = new String("Harry Potter") ;
C) String name = "Harry" + " " + "Potter";
D) String name = new String("Harry" + " " + "Potter") ;
E) Any of these would work

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions