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);
}
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
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.
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
Log in to ExamTopics
Sign in:
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.
v323rs
Highly Voted 5 years, 2 months agohyodaeun
Highly Voted 6 years, 2 months agodin_sub077
Most Recent 4 weeks, 1 day agoTheeOne
2 months, 2 weeks agoThe_Java_Champion
3 months, 4 weeks agolakshman_rlr
6 months, 3 weeks agousama0710
2 months, 3 weeks agofvelazqueznava
1 year, 5 months agoSkytrix
1 year, 5 months ago3Apr
1 year, 6 months agoDarGrin
1 year, 6 months agosscm
1 year, 6 months agoa_really_reliable_programmer
1 year, 7 months agosomrita90
1 year, 7 months agoSreeni_A
1 year, 7 months agopbbvr
1 year, 8 months agodsms
1 year, 8 months agombns
1 year, 8 months ago