Write a program that has an array of 5 Strings, and determines which ones are
palindromes (letter-case does not matter)
The main should only initialize the array, and
print the palindrome words found. You can break your problem into smaller pieces
dealt with in separate methods. For example you might need a method that determines
whether a String is a palindrome or not
public class Palindrome { public static void main(String [] args) { String[] s = new String[5]; } public static String Reverse(String x) { String hold = ""; char [] c = x.toCharArray(); for (int i = c.length-1; i>0; i--) hold = hold +c[i]; return hold; } public static boolean pallindromCheck(String n) { String x=Reverse(n); if (x==n) return true; else return false; } }
thanks...