Here S = Task. After the 1st query S++, the string becomes Taskk. After the 2nd query S+1, the string becomes TaskkTaskk. After the 3rd query ++S, the string becomes TTaskkTaskk.
A Java string is a sequence of characters that exists as an object of the class java.lang. Java strings are created and manipulated through the string class. Once created, a string is immutable -- its ...