Create Palindrome2.java

Check whether the input string is a palindrome by comparing the characters from both ends