public class Test {
public static void main(String[] args) {
String ta = "A ";
System.out.println(ta);
ta = ta.concat("B ");
System.out.println(ta);
String tb = "C ";
ta = ta.concat(tb);
System.out.println(ta);
ta.replace("B" ,"C");
System.out.println(ta);
ta = ta.concat("D");
System.out.println(ta);
}
try this if wanna understand more on this
public class Test {
public static void main(String[] args) {
String ta = "A ";
System.out.println(ta);
ta = ta.concat("B ");
System.out.println(ta);
String tb = "C ";
ta = ta.concat(tb);
System.out.println(ta);
ta.replace("B" ,"C");
System.out.println(ta);
ta = ta.concat("D");
System.out.println(ta);
}
try this if wanna understand more on this
Correct, Answer is A.
To test:
public static void main(String[] args) {
String ta = "A ";
ta = ta.concat("B ");
String tb = "C ";
ta = ta.concat(tb);
ta.replace("B" ,"C");
ta = ta.concat("D");
System.out.println(ta);
}
upvoted 2 times
...
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.
shiv2
2 months, 1 week agoshiv2
2 months, 1 week agoDriftKing
3 months, 4 weeks agopbbvr
4 months, 4 weeks agoEricausdresden
5 months, 2 weeks agocarloswork
1 year, 2 months ago