字符串问题 String 和 StringBuffer之间的转换
package hd11;
import java.util.*;
class Nyoj14
{
public static void main(String args[]){
Scanner cin=new Scanner(System.in);
while (cin.hasNext())
{
int n= cin.nextInt();
String b =cin.nextLine();
for(int i=0;i<n;i++)
{
String s = cin.nextLine();
StringBuffer str=new StringBuffer();
str.append(s);
String ss = str.reverse().toString();
if(ss.equals(s))
{
System.out.println("yes");
}
else
{
System.out.println("no");
}
}
}
}
}