Solved

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

Question 38

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents