java,字符串数组截取
答案:2 悬赏:10 手机版
解决时间 2021-02-15 15:40
- 提问者网友:雨不眠的下
- 2021-02-14 20:55
java,字符串数组截取
最佳答案
- 五星知识达人网友:神鬼未生
- 2021-02-14 22:15
public class Test {
public static void main(String[] args) {
String [] line1 =new String[] {"西朗","坑口","花地湾","芳村","黄沙","长寿路","陈家祠","西门口"} ;
Test test = new Test();
test. print(line1,5);
}
public void print(String[] array, int i)
{
for(int j=0; j {
System.out.println(array[j]);
}
}
}
通过你的字符串数组下标来获取想要的内容
public static void main(String[] args) {
String [] line1 =new String[] {"西朗","坑口","花地湾","芳村","黄沙","长寿路","陈家祠","西门口"} ;
Test test = new Test();
test. print(line1,5);
}
public void print(String[] array, int i)
{
for(int j=0; j {
System.out.println(array[j]);
}
}
}
通过你的字符串数组下标来获取想要的内容
全部回答
- 1楼网友:傲气稳了全场
- 2021-02-14 22:39
for(int i=1;i<4;i++)
System.out.println(line1[i]);
System.out.println(line1[i]);
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯