System. out. println(" cubic centimetres.");
符号:方法 println(String)
位置:类型为PrintlnStream的变量 out
public class BoxVolume {
public static void main(String[] args) {
int width = 20; // width of cube in cms
double length = 30.5; // length of cube in cms
double depth = 10.5; // depth of cube in cms
// compute the volume
double volume = width*length*depth;
// write the result
System. out. print("Your box has a volume of ");
System. out. print(volume);
System. out. ptintln(" cubic centimetres.");
}
}
D:\myJava> javac BoxVolume.java
BoxVolume.java:15: 错误: 找不到符号
System. out. ptintln(" cubic centimetres.");
^
符号: 方法 ptintln(String)
位置: 类型为PrintStream的变量 out
1 个错误