I managed to reverse a String making it a char array, also with .reverse method on a Stringbuilder, managed to do it with another String and a for loop (I read that this isn't a good idea because it hurts the performance), but i cant figure out how to reverse a string with a Stringbuilder and for loop. It gives me error - "The left-hand side must be a variable" . Also tried to set a length for the Stringbuilder, but looks like I am missing something. I tried to set indexes outside the brackets of the Stringbuilder, because they are for parameters, but I am just guessing how to do it, tried .append as well.
public class Task1 {
public static void main(String[] args) {
String str = "Reverse me";
StringBuilder printStr = new StringBuilder();
int j = 0;
for (int i = str.length()-1; i > 0; i--) {
printstr(j) = str[i];
}
}
}

StringBuilderspecially handle such case: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/07011844584f/src/share/classes/java/lang/AbstractStringBuilder.java