首页 > 编程语言 > 详细

import static java.lang.System.out, while (false)

时间:2020-05-24 23:08:15      阅读:73      评论:0      收藏:0      [点我收藏+]

 

 

 

import static java.lang.System.out;
public class hello
{
    public static void main(String[] args)
    {
        boolean bool = false;
        while (false) //这里如果直接换成while (false) 编译时提示error: unreachable statement
        {
            out.println("work is like a capricious lover..."); //这里只用了out.println,而不是System.out.println; 原因是开头的import
        }
        out.println("no matter what, I‘ll run.");
    }
}

 

import static java.lang.System.out, while (false)

原文:https://www.cnblogs.com/profesor/p/12953118.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!