0
這是什麼問題;int爲字節,「無法解析爲變量」。哪裏不對?
public class cast {
public static void main(String args[]){
double x, y;
int i;
char c;
x = 10.0;
y = 3.0;
i = (int) (x/y);
System.out.println("Integer outcome of x/y = " + i);
i = 100; //Assaigning new value to i.
b = (byte) i;
System.out.println("The value of i is: " + b);
}
}
它給了我下面的錯誤信息; b不能解析爲變量。
雖然我沒有,正是因爲他們在書中做了(我認爲,重新讀了這本書指令像五次....)