I've just started learning Java and went to compare my finished product to some others on Stack Overflow. Is there a reason why mine is "simple" and the others seem ridiculously hard to even understand (for me)? Link to the other palindrome checker.
Can you just break it down for me (the good/bad/ugly of my code)? Constructive criticism would be great as I'm very good at memorizing the books I use to learn Java. I just have a hard time implementing them and it's always good to have a second opinion.
public class Checker
{
public static void main(String [] args) {
String original = "hannah";
String reversed = original;
for (String part : original.split(" ")) {
System.out.println(original);
System.out.println(new StringBuilder(part).reverse().toString());
}
System.out.print(original.equals(new StringBuilder(reversed).reverse().toString()));
}
}