JAVA问题关于java作业问题7道题目

2025-04-02 11:38:57
推荐回答(2个)
回答1:

题目2答案
public class StrPalindromic {

public static void main(String[] args) {
String str = "able was i ere i saw elba@";

isReturn(str);
}

public static void isReturn(String str)
{
str=str.substring(0, str.indexOf('@'));
for(int i=0;i {
if(str.charAt(i)!=str.charAt(str.length()-1-i))
{
System.out.println(str+" "+ "不是回文");
return;
}
}
System.out.println(str+" "+"是回文");
}
}

回答2:

专门做java作业 see my name .find me