当前位置: 技术问答>java相关
新手上路,摔了一跤,help!~~~~
来源: 互联网 发布时间:2015-05-03
本文导语: public class UsesConstants { public static void main(String[] args) { final double CM_PER_INCH = 2.54; double paperWidth = 8.5; double paperHeight = 11; system.out.println("Paper size in centimeter: " + paperWidth...
public class UsesConstants
{
public static void main(String[] args)
{
final double CM_PER_INCH = 2.54;
double paperWidth = 8.5;
double paperHeight = 11;
system.out.println("Paper size in centimeter: "
+ paperWidth * CM_PER_INCH + " by "
+ paperHeight * CM_PER_INCH );
}
}
编译时出错
E:javaUsesConstants.java:8: package system does not exist
system.out.println("Paper size in centimeter: "
这是Java核心技术卷I里面的例程
是不是非要装他那个什么Core Java啊?
我有j2sdk1.4.0
hello world能够成功编译运行啊
{
public static void main(String[] args)
{
final double CM_PER_INCH = 2.54;
double paperWidth = 8.5;
double paperHeight = 11;
system.out.println("Paper size in centimeter: "
+ paperWidth * CM_PER_INCH + " by "
+ paperHeight * CM_PER_INCH );
}
}
编译时出错
E:javaUsesConstants.java:8: package system does not exist
system.out.println("Paper size in centimeter: "
这是Java核心技术卷I里面的例程
是不是非要装他那个什么Core Java啊?
我有j2sdk1.4.0
hello world能够成功编译运行啊
|
注意大小写
|
是System
|
System.out.println("Paper size in centimeter: "
|
S---
|
System.out.println("Paper size in centimeter: "
替换你原来那句
替换你原来那句
|
注意大小写!
努力
java的阵营在强大:)
努力
java的阵营在强大:)