1、String s=null;
         System.out.println("s="+s.length());
        
输入为:xception in thread "main" java.lang.NullPointerException
         注意:不是0. 这是一个运行时异常

2、String s;
       System.out.println("s="+s);
        这样会报出一个编译错误。错误为:The local variable s may not have been initialized

3、which three are valid declaraction of a float?
    A. float foo=-1;
    B. float foo=1.0;
    C. float foo=42e1;
    D. float foo=2.02f;
    E. float foo=3.03d;
    F. float foo=0x0123;
  G. float foo=139e1;
  Answer:A,D,F,G


评论
发表评论

您还没有登录,请登录后发表评论

younker
搜索本博客
最近加入圈子
存档
最新评论