Is this a bad way to reverse a string? I'm still somewhat of a beginner and I've read that some companies look for how you would reverse a string? So here's how I did it, and it works but would companies look down on this? I'm in my second semester of a first year CS major at a University. Thanks in advance!
String reversedWord = "";
for (int i = 0; i < word.length(); i++)
{
char temp = word.charAt(word.length()-1-i);
reversedWord = reversedWord + temp;
}
System.out.println(reversedWord);