代码部分
public class A {
public static void main(String []args) {char a='g';short b=103;if((short)a=103){System.out.println("相等");}if((short)a<103&&(short)a>103){System.out.println("不相等");}
}
}
错误提示
Main.java:2: error: unexpected type
public static void main(String []args) {char a='g';short b=103;if((short)a=103){System.out.println("相等");}if((short)a<103&&(short)a>103){System.out.println("不相等");}
^
required: variable
found: value
1 error