exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 12 discussion

Actual exam question from Oracle's 1z0-808
Question #: 12
Topic #: 1
[All 1z0-808 Questions]

Given:

What is the result?

  • A. A B C D
  • B. A C D
  • C. A C D D
  • D. A B D
  • E. A B D C
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
v323rs
Highly Voted 5 years, 2 months ago
The correct answer C. "A B C C", because ta.replace('C', 'D') dot't change ta
upvoted 40 times
...
hyodaeun
Highly Voted 6 years, 2 months ago
Answer is C
upvoted 18 times
...
din_sub077
Most Recent 4 weeks, 1 day ago
Selected Answer: C
Answer is "A B C C" which is not there
upvoted 1 times
...
TheeOne
2 months, 2 weeks ago
Selected Answer: E
Answer is ABCC, see below public static void main(String[] args) { String ta = "A "; // ta= A ta = ta.concat("B ");// ta= A B String tb = "C "; ta = ta.concat(tb); //ta = A B C ta.replace('C', 'D'); //ta= ABC, note that ta.replace is not assigned to ta ta = ta.concat(tb);// ta = A B C C System.out.println(ta); }
upvoted 1 times
...
The_Java_Champion
3 months, 4 weeks ago
Selected Answer: E
The Correct answer is "A B C C ", not any of the other options provided.
upvoted 2 times
...
lakshman_rlr
6 months, 3 weeks ago
The Output is "A" , Since strings are immutable so the ta will not be reassigned throught the excution
upvoted 1 times
usama0710
2 months, 3 weeks ago
Keep in mind that "ta" will take a new object after every " ta = ... "
upvoted 1 times
...
...
fvelazqueznava
1 year, 5 months ago
ABCC is the correct
upvoted 6 times
...
Skytrix
1 year, 5 months ago
The correct answer is ABCC
upvoted 5 times
...
3Apr
1 year, 6 months ago
None of this option are correct, replace doesn't modify ta, so basically the final output will be A B C C, if it was ta = ta.replace('C','D') it would be A B D C so C would be correct
upvoted 5 times
...
DarGrin
1 year, 6 months ago
Selected Answer: C
The correct answer ist "A B C C". There is now correct answere hier...
upvoted 4 times
...
sscm
1 year, 6 months ago
None of the option are correct
upvoted 2 times
...
a_really_reliable_programmer
1 year, 7 months ago
No Solution (On the website) A B C C String is immutable (Not string builder)
upvoted 3 times
...
somrita90
1 year, 7 months ago
ABCC is the correct answer, String is immutable, until and unless its assigning or reassigning, it will not change the value.
upvoted 1 times
...
Sreeni_A
1 year, 7 months ago
None of the options are correct and the Answer is A B C C and there is no option in the provided answers
upvoted 2 times
...
pbbvr
1 year, 8 months ago
A B C C
upvoted 1 times
...
dsms
1 year, 8 months ago
why did the answer option C: ABCC change to ACDD??? Yesterday option C: contained the correct answer, today it has changed to another one and it turns out that there is no correct answer among the answer options.
upvoted 2 times
...
mbns
1 year, 8 months ago
None of the choices is true. The true answer is ABCC. String cannot be changed and ta.replace('C', 'D') make no sense
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago