need help Palindrome program,
February 12, 2008 at 7:23 PM
i need help of my prg in palindrome class Palindrome { public static void main(String[] args) throws IOException { String str[]=new String[1]; String dest[]=new String[1]; int j=0; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the String to Palindrome"); int i=str.length; for(i=(i-1);i>=0;i--) { str[i]=br.readLine(); dest[j]=str[i]; j++; } //if(dest.compareTo(str)==0) if(str.equals(dest)) { System.out.println("String are Palindroome"); } else { System.out.println("not palindrome"); } } }