当前位置: 技术问答>java相关
循环和条件语句的高手请进,一定给分(就剩18分了),只要你答对。
来源: 互联网 发布时间:2015-01-08
本文导语: 我的测试程序loop.java: public class loop { public static void main(String[] args) { String[] array1 = {"e1","e2","e3","e4","e5","e6"}; int[] array2 = {3,5}; for(int m=0;mjavac loop.java E:tomcatwebappspage>java loop e1 e1 e2 e2 e3 e3 e4 e5 e5 e6 现...
我的测试程序loop.java:
public class loop
{
public static void main(String[] args)
{
String[] array1 = {"e1","e2","e3","e4","e5","e6"};
int[] array2 = {3,5};
for(int m=0;mjavac loop.java
E:tomcatwebappspage>java loop
e1
e1
e2
e2
e3
e3
e4
e5
e5
e6
现在我期望输出内容为:
e1
e2
e3
e5
请问这一段程序该如何改?
public class loop
{
public static void main(String[] args)
{
String[] array1 = {"e1","e2","e3","e4","e5","e6"};
int[] array2 = {3,5};
for(int m=0;mjavac loop.java
E:tomcatwebappspage>java loop
e1
e1
e2
e2
e3
e3
e4
e5
e5
e6
现在我期望输出内容为:
e1
e2
e3
e5
请问这一段程序该如何改?
|
public class loop
{
public static void main(String[] args)
{
String[] array1 = {"e1","e2","e3","e4","e5","e6"};
int[] array2 = {3,5};
Outer:
for(int m=0;m
{
public static void main(String[] args)
{
String[] array1 = {"e1","e2","e3","e4","e5","e6"};
int[] array2 = {3,5};
Outer:
for(int m=0;m