按字面意义级联字符串,如"this " "is " "string"会被自动转换为this is string.
答案:1 悬赏:50 手机版
解决时间 2021-02-05 13:29
- 提问者网友:人傍凄凉立暮秋
- 2021-02-05 09:51
按字面意义级联字符串,如"this " "is " "string"会被自动转换为this is string.
最佳答案
- 五星知识达人网友:有你哪都是故乡
- 2021-02-05 10:30
只模拟原理:中间省略了判断步骤!
public class Men{
public static void main(String[] args) {
String[] s1= {"this ","that "};//一级
String[] s2= {"is "};//二级
String[] s3= {"String","Number","Object"};//三级
for (int i = 0; i < s1.length; i++) {
for (int j = 0; j < s2.length; j++) {
for (int j2 = 0; j2 < s3.length; j2++) {
System.out.println(s1[i]+s2[j]+s3[j2]);
}
}
System.out.println();
}
}
}
public class Men{
public static void main(String[] args) {
String[] s1= {"this ","that "};//一级
String[] s2= {"is "};//二级
String[] s3= {"String","Number","Object"};//三级
for (int i = 0; i < s1.length; i++) {
for (int j = 0; j < s2.length; j++) {
for (int j2 = 0; j2 < s3.length; j2++) {
System.out.println(s1[i]+s2[j]+s3[j2]);
}
}
System.out.println();
}
}
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯