tedeyang 发表于 2013-2-3 14:20:26

保证你要猜错(五)

public class Test {   public static void main(String[] args) {   System.out.print("用");   http://www.google.com;   System.out.println("搜索");   }}   上面的程序可以编译并运行吗?
   为什么?
 
答案:(同事)
java语言中label用:表示,而注释用//,所以http://www.google.com;完全符合java语法。
把http://www.google.com;拆成两行就很好理解了:
http:
//www.google.com;
页: [1]
查看完整版本: 保证你要猜错(五)