当前位置: 代码迷 >> Eclipse >> 什么情况下eclipse-run as找不到application?该怎么解决
  详细解决方案

什么情况下eclipse-run as找不到application?该怎么解决

热度:95   发布时间:2016-04-23 13:57:07.0
什么情况下eclipse-run as找不到application?
没有提示错误,但是运行不了,知道怎么办
我的程序如下:
package day2;

public class Course {
String courseID;
String courseName;
String courseType;
int classHour;
float credit;

public Course(String courseID, String courseName, String courseType, int classHour, float credit){
this.courseID = courseID;
this.courseName = courseName;
this.courseType = courseType;
this.classHour = classHour;
this.credit = credit;
}

public void setCourseID(String courseID){
this.courseID = courseID;
}

public String getCourseID(){
return courseID;
}

public void setCourseName(String courseName){
this.courseName = courseName;
}

public String getCourseName(){
return courseName;
}

public void setCourseType(String courseType){
this.courseType = courseType;
}

public String getCourseType(){
return courseType;
}

public void setClassHour(int classHour){
this.classHour = classHour;
}

public int getClassHour(){
return classHour;
}

public void setCredit(float credit){
this.credit = credit;
}

public float getCredit(){
return credit;
}

public void print(){
System.out.println("The basic info of this course as followed:");
System.out.println("the courseID: "+this.getCourseID());
System.out.println("the courseName: "+this.getCourseName());
System.out.println("the courseType: "+this.getCourseType());
System.out.println("the classHour: "+this.getClassHour());
System.out.println("the credit: "+this.getCredit());
System.out.println("------------------------------------------");
}

public static void mian(String[] args){
Course cs = new Course("D13","Java Program Design","CS",64,3.5f);
//Course cs = new Course("D13","Java Program Design","CS",64,3.2不加f就默认double型,错);
System.out.println("------------------------------------------");
cs.print();

cs.setCredit(4.0f);//同上,一定要加f
System.out.println("Alter the credit as a new value 4.0.");
cs.print();

}
}


------解决方案--------------------
没什么特别的呀,怎么会运行不了?
------解决方案--------------------
探讨
没有提示错误,但是运行不了,知道怎么办
我的程序如下:
package day2;

public class Course {
String courseID;
String courseName;
String courseType;
int classHour;
float credit;

public Course(String courseID, String c……

------解决方案--------------------
探讨
引用:
没有提示错误,但是运行不了,知道怎么办
我的程序如下:
package day2;

public class Course {
String courseID;
String courseName;
String courseType;
int classHour;
float credit;

public Course(Str……
  相关解决方案