![]() |
#2
wgbs256735782015-10-08 11:22
|

public class 个人练习 {
public static void main(String[] args) {
String str = "we are student";
int size = str.lastIndexOf("s");
System.out.print(size);
System.out.print("\n");
System.out.print();
}
}
public class 个人练习 {
public static void main(String[] args) {
String str = "we are student";
int size = str.lastIndexOf("s");
System.out.print(size);
System.out.print("\n");
System.out.println();
}
}
想问一下这样为什么会报错,两段代码都是一样的,就是最后的时候差了一个换行的"ln",能给解释一下吗?