package d1;
public class o6 {
public static void main(String[] args) {
String p= "qwfwgfd";
System.out.println("a的下标为" + p.indexOf("a"));
System.out.println("a的下标为" + p.lastIndexOf("a"));
if (p.equals(p.charAt(0)) == p.equals(p.charAt(p.length()-1))) {
p="*qw*";
System.out.println("p = " + p);
}
}
}
07-12
280
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交