Computer Science, asked by ashna1610, 1 month ago

Print an integer representing the number of data characters that do not change position even after after the data stream is reversed. If no such character is found or the input string is empty then print 0.​

Answers

Answered by Anonymous
1

Explanation:

the method String::repeat that does exactly what you asked for:

String str = "abc";

String repeated = str.repeat(3);

repeated.equals("abcabcabc");

Its Javadoc says:

Similar questions