您的位置:首页 > 编程语言 > Java开发

Java Puzzlers笔记--puzzle 22:Dupe of URL url的使用

2007-03-07 21:57 525 查看
public class BrowserTest{
 public static void main(String[] args){
  System.out.println("iexplore.exe");
  http://www.google.com
  System.out.println(":maxmize");
 }


Solution:

               显示:iexplore.exe

                           :maxmize

               由于URL在java中被认为是注释,不做任何事情

TID:

         The URL that appears in the middle of the program is a statement lable followed by an end-of-line comment.

          The lesson of this puzzle is that misleading comments and extraneous code cause confusion. Write comments carefully and keep them up to date. Excise dead code.

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  url java comments string class up