
def test():
for i in range(10):
if i % 2 !=0:
print("hello world")
else:
pass
test() #调用函数
package com.duoceshi.thread;
public class HelloWorld {
public static void test(){
for (int i = 0; i < 10 ; i++) {
if (i % 2 == 0){
continue;
}else{
System.out.println("hello world");
}
}
}
public static void main(String[] args) {
HelloWorld.test();
}
}
版权声明:本文为weixin_39362573原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。