Which of the following is a valid Java statement?
A) String str = 'John Doe';
B) string str = "John Doe";
C) string str = 'John Doe';
D) String str = "John Doe";
Correct Answer:
Verified
Q19: A Java program will not compile unless
Q38: What will be the value of z
Q39: To print "Hello, world" on the monitor,
Q40: Given the declaration double r;, which of
Q41: Both character literals and string literals can
Q42: In Java the variable named total is
Q44: A variable's scope is the part of
Q45: Which Scanner class method reads a String?
A)
Q47: Assuming that pay has been declared a
Q48: This is a variable whose content is
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents