Test.java
public class Test {
public static void main(String args[])
{
String str1="aacdabcd";
String str2="abcdabcd";
System.out.println(str1.indexOf(98));
System.out.println(str2.index0f(98));
}}
public class Test {
public static void main(String args[])
{
String str1="aacdabcd";
String str2="abcdabcd";
System.out.println(str1.indexOf(98));
System.out.println(str2.index0f(98));
}}
解决方案 »
- 在线等:求救如何解决:don't flush the Session after an exception occurs的方法
- java web导出数据
- Java中double类型的小数位数控制
- ftp创建远程目录问题
- spring +weblogic+jms访问出错
- 模拟的unix主机实现telnet功能出现的问题:
- 急急急! UserTransaction包导入问题
- Ecplise 3的插件如何安装啊,我把文件已经拷到Plug-in里面了啊
- 谁来讲下 JAVA里的类的生命周期和对象的生命周期
- jpa sql查询的问题
- 用文件保存数据的问题
- 对象有很多属性,只有其中几个时,从性能考虑是不是重新建一个小的对象
System.out.println(str2.index0f(98));
等待高人解答
还发了两个
方法调错了吧,你上下两个indexOf()调的不一样,str2.indexOf(98),你第二个写成0(零)了吧