editor does not contain a main type的问题
2012-04-25 00:00
323 查看
在编写java代码的时候,一定要在英文状态下输入大括号,小括号,分号!!
package baobao;
public class Text4 {
public static void main( string[] args){
for(int i = 1;i <= 12;i++){
System.out.println("第" + i + "月");
for(int j = 1;j <= 30;j++){
System.out.println("第"+ i + "月第" + j +"日");
}
}
}
}
一、上面代码在eclipse,检测不出任何错误,但是就是不能运行,快捷键ALT+Shift+X,j 运行弹出对话框:
editor does not contain a main type: 编辑器中不包含的主要类型
二、用jdk自带的编译器,编译:查出错误原因,
原来是String这个单词的首字母“S”打成了小写。可见eclipse 集成开发环境(IDE)下的编译器有一定的缺陷。
package baobao;
public class Text4 {
public static void main( string[] args){
for(int i = 1;i <= 12;i++){
System.out.println("第" + i + "月");
for(int j = 1;j <= 30;j++){
System.out.println("第"+ i + "月第" + j +"日");
}
}
}
}
一、上面代码在eclipse,检测不出任何错误,但是就是不能运行,快捷键ALT+Shift+X,j 运行弹出对话框:
editor does not contain a main type: 编辑器中不包含的主要类型
二、用jdk自带的编译器,编译:查出错误原因,
原来是String这个单词的首字母“S”打成了小写。可见eclipse 集成开发环境(IDE)下的编译器有一定的缺陷。
相关文章推荐
- Eclipse 软件 Java 解决:出现的editor does not contain a main type错误框 问题
- Editor does not contain a main type 问题解决
- Eclipse 软件 Java 解决:出现的editor does not contain a main type错误框 问题
- Eclipse 软件 Java 解决:出现的editor does not contain a main type错误框 问题
- eclipse解决editor does not contain a main type的方法
- Eclipse editor does not contain a main type的解决方案
- editor does not contain a main type的解决方案
- java" selection does not contain a main type"的问题处理方法
- editor does not contain a main type
- editor does not contain a main type
- editor does not contain a main type的解决方案
- eclipse解决editor does not contain a main type的方法
- editor does not contain a main type的解决方案
- Eclipse中出现Editor does not contain a main type或者Selection does not contain a main type
- editor does not contain a main type的解决方案
- editor does not contain a main type" 错误解决方
- editor does not contain a main type
- Eclipse下有main函数类运行报错:Editor does not contain a main type
- editor does not contain a main type
- editor does not contain a main type" 错误解决方