本来就没有办法编译,jbuilder 说\u0004是个变量

解决方案 »

  1.   

    \u0041表示A啊,你把A改成B,把\u0042,一样可以通过了。
      

  2.   

    我不要上面的byte A=1为什么不能编译呢?
      

  3.   

    你的原程序不能编译啊,改成
    public class TestChar {
      public static void main(String[] args) {
        byte A = 1;
        byte B = '\u0041';
        System.out.println(B);
      }
    }
    才可以然后,去了byte A=1完全没问题呀!
      

  4.   

    public class TestChar {
      public static void main(String[] args) {
        byte A = 1;
        byte B = '\u0041';
        System.out.println(B);
      }
    }
    public class TestChar {
      public static void main(String[] args) {
        byte A = 1;
        byte B = \u0041;
        System.out.println(B);
      }
    }
    结果都是1
    但请注意:public class TestChar 
    {
    public static void main(String[] args) 
    {byte B = '\u0041'; 
    System.out.println(B);
    }
    }
    结果是:65
      

  5.   

    注意到 \u0041=A所以上面的程序相当于 A=1;B=A;
    去掉A=1当然不能编译至于下面的写法当然可以编译,但是与一开始的程序不一样了
      

  6.   

    public class TestChar 
    {
    public static void main(String[] args) 
    {byte B = '\u0041'; 
    System.out.println(B);
    }
    }
    去掉byte A = 1;结果是:65
      

  7.   

    casemy(derik) 说得对。\u0041=A