Advertisements
Advertisements
Question
Write the output of the codes given below.
String ts = “ALL PROBLEMS SOLVED";
String rs = ts.substring(ts.indexOf('P'));
String vs = rs.substring(rs.lastIndexOf('S'));
ts = (ts.concat(vs)).concat(rs);
System.out.println(" TS = "+ ts);Very Short Answer
Advertisements
Solution
TS = ALL PROBLEMS SOLVED SOLVED PROBLEMS SOLVED
shaalaa.com
Is there an error in this question or solution?
