This question already has answers here:
Java Label usage [duplicate]
                                
                                    (2个答案)
                                
                        
                                3年前关闭。
            
                    
下面的程序成功编译并运行,没有任何错误。根据我的理解,应该在第4行中引发错误。有人可以解释吗?

class Test{
    public static void main(String args[]) {
        // my favorite website is
        http://www.stackoverflow.com/questions/ask
        System.out.println("hello world");
    }
}

最佳答案

不,这不是错误,“ http:”在这里作为标签名称,“ //”开始被忽略的注释。

10-05 18:35
查看更多