一、扩展名隐藏编译失败
二、javac + fileName.java
java + className ( 不加扩展名)
三、编译结果
文件名 helloworld.java
类 class helloworld{
}
编译后类文件 helloworld.class
文件名 helloworld.java
类 class test{
}
编译后的类文件 test.class
编译后的类文件名 始终跟类名保持一致
所以要求类名跟文件名一致不易出错
一、扩展名隐藏编译失败
二、javac + fileName.java
java + className ( 不加扩展名)
三、编译结果
文件名 helloworld.java
类 class helloworld{
}
编译后类文件 helloworld.class
文件名 helloworld.java
类 class test{
}
编译后的类文件 test.class
编译后的类文件名 始终跟类名保持一致
所以要求类名跟文件名一致不易出错
Hong Kong
+852 5104 3232
立即参与
意
见
箱