import java.io.*;
import java.util.*;
public class huiwen{
public static void main(String args[]){
int i,j,k,a;
String x,y;
int shuzhu[];
int shuzhu1[];
shuzhu=new int[100];
shuzhu1=new int[100];
System.out.println("\nplease input some strings:");
String s=" ";
try
{
BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));
s = in.readLine();
}catch(IOException e){}
a=s.length();
if(a%2==0)
{
for(i=0;i<(a/2);i++)
shuzhu[i]=s.charAt(i);
x=shuzhu.toString();
for(j=a-1;j>(a-1)/2;j--)
shuzhu1[j]=s.charAt(j);
y=shuzhu1.toString();
if(x.compareTo(y)==0)
System.out.println("\nthe strings"+s+"is an huiwenshu!\n");
}
}
}
这个程序没有错!但是就是没有结果,各位高手帮我看一下好吗?麻烦拉!
求回文数