Java Program Palindrome Using Javascript Variables