本题是判断一个字符串“Tom”是否在另外一个字符串 “I am Tom,I am from China”中出现。
public class javal{
public static void main(String[]args){

strl="I am Tom,I am from China.";
str2="Tom";
int i= ;
if( )
System.out.println("\"+str2+"\"is in the
string:\""+strl+"\"");
else
System.out.println("\""+str2+"\"is not in the
string:\""+strl+"\"");
}
}

发布于 2022-05-11 10:33:14

登录后免费查看答案
关注者
0
被浏览
23
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看