【发布时间】:2013-07-11 16:54:04
【问题描述】:
计划
public class Project_X
{
public static void main(String[] args){
byte x;
int a=270;
double b =128.128;
System.out.println("int converted to byte");
x=(byte) a;
System.out.println("a and x "+ a +" "+x);
System.out.println("double converted to int");
a=(int) b;
System.out.println("b and a "+ b +" "+a);
System.out.println("n double converted to byte");
x=(byte) b;
System.out.println("b and x "+b +" "+x);
}
}
错误获取
非法字符:\160
【问题讨论】:
-
我刚开始,已经是一个我无法弄清楚的问题。请帮忙
-
哪一行导致错误?并且请发布格式化的代码,而不是所有左对齐的代码,因为这很难阅读。
-
我运行了上面的程序,没有其他的
-
它就像这样fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-frc3/q71/s720x720/… 我正在编译它,但它给了我我无法弄清楚的错误。
-
\u160是non-breaking space。您是否尝试过删除并重新输入该行?
标签: java variables project type-conversion bluej