Which of the following will create a String different from the other three?
A) String r = "123456"
B) int i = 123; int j = 456;
String r = String.valueOf(j) + String.valueOf(i) ;
C) int i = 123; int j = 456;
String r = String.valueOf(i) + String.valueOf(j) ;
D) int i = 123; int j = 456;
String r = i + j;
Correct Answer:
Verified
Q1: A String constructor cannot be passed _.
A)
Q2: An anonymous String _.
A) has no value
B)
Q4: Consider the String below:
String r =
Q5: Consider the examples below:
A. a string.
B.
Q6: How many String objects are instantiated by
Q7: Which of the following is not a
Q8: The statement
s1.equalsIgnoreCase(s4)
Is equivalent to which of
Q9: The length of a string can be
Q10: Consider the statement below:
StringBuilder sb1 =
Q11: Given the following declarations:
StringBuilder buf;
StringBuilder buf2
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