• 2021-04-14 问题

    阅读下列程序,请写出该程序的功能。 import java. util.*; public class Class1{ public static void main(Srting args[]){ Date date1=new Date(); System. out. println (datel); String t=datel.toString(); int endPos=t.indexOf(`C'); t=t.substring(11,endPos); System. out println(t); } }

    阅读下列程序,请写出该程序的功能。 import java. util.*; public class Class1{ public static void main(Srting args[]){ Date date1=new Date(); System. out. println (datel); String t=datel.toString(); int endPos=t.indexOf(`C'); t=t.substring(11,endPos); System. out println(t); } }

  • 2022-07-29 问题

    使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。 A: 字符串"helloworld"中不包含G字符,indexOf返回0 B: 字符串"helloworld"中不包含G字符,indexOf返回null C: 字符串"helloworld"中不包含G字符,indexOf返回-1 D: 字符串"helloworld"中不包含G字符,indexOf返回1

    使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。 A: 字符串"helloworld"中不包含G字符,indexOf返回0 B: 字符串"helloworld"中不包含G字符,indexOf返回null C: 字符串"helloworld"中不包含G字符,indexOf返回-1 D: 字符串"helloworld"中不包含G字符,indexOf返回1

  • 2022-07-29 问题

    使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。 A: A字符串"helloworld"中不包含G字符,indexOf返回0 B: B字符串"helloworld"中不包含G字符,indexOf返回null C: C字符串"helloworld"中不包含G字符,indexOf返回-1 D: D字符串"helloworld"中不包含G字符,indexOf返回1

    使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。 A: A字符串"helloworld"中不包含G字符,indexOf返回0 B: B字符串"helloworld"中不包含G字符,indexOf返回null C: C字符串"helloworld"中不包含G字符,indexOf返回-1 D: D字符串"helloworld"中不包含G字符,indexOf返回1

  • 2021-04-14 问题

    智慧职教: indexOf() 方法对大小写敏感

    智慧职教: indexOf() 方法对大小写敏感

  • 2021-04-14 问题

    若字符串的indexOf()方法查找失败,则返回( )

    若字符串的indexOf()方法查找失败,则返回( )

  • 2021-04-14 问题

    关于String类的indexOf说法不正确的是( )

    关于String类的indexOf说法不正确的是( )

  • 2022-05-30 问题

    若有语句 s = “ java ” ; 则查找 s 中字母 a 最后出现的位置的语句是()。 A: s . lastIndexOf ( ‘ a ’) ; B: indexOf ( s ,‘ a ’ ) ; C: charAt ( 2 ) ; D: s .indexOf ( ‘ a’ );

    若有语句 s = “ java ” ; 则查找 s 中字母 a 最后出现的位置的语句是()。 A: s . lastIndexOf ( ‘ a ’) ; B: indexOf ( s ,‘ a ’ ) ; C: charAt ( 2 ) ; D: s .indexOf ( ‘ a’ );

  • 2021-04-14 问题

    indexOf()方法在数组元素检索时与运算符“==”相同

    indexOf()方法在数组元素检索时与运算符“==”相同

  • 2022-07-24 问题

    从一个字符串中取出指定位置的字符,采用String类中的()方法。 A: charAt() B: endsWith() C: A、charAt()B、endsWith()C、indexOf()D、substring() D: indexOf()

    从一个字符串中取出指定位置的字符,采用String类中的()方法。 A: charAt() B: endsWith() C: A、charAt()B、endsWith()C、indexOf()D、substring() D: indexOf()

  • 2021-04-14 问题

    1. 对字符串”ababcdabcdefg”使用indexOf(‘a’)和lastIndexOf(‘a’),的运行结果是( )

    1. 对字符串”ababcdabcdefg”使用indexOf(‘a’)和lastIndexOf(‘a’),的运行结果是( )

  • 1 2 3 4 5 6 7 8 9 10