Java报错the selection cannot be launched,and there are no recent launches

第一次写代码,run的时候报错"the selection cannot be launched,and there are no recent launches",希望懂的人帮助我一下

class Mydate {
    private int day;
    private int month;
    private int year;
    public String getDate() {
        return day+"/"+month+"/"+year;
    }
    public int setDate(int a,int b,int c) {
        if((a>0&&a<=31)&&(b>0&&b<=12)) {
            day=a;
            month=b;
            year=c;
            return 0;
        }
        else {
            return -1;
        }
    }

}
 class UseMyDate{
    public static void main(String[] args) {
        Mydate d=new Mydate();
        if(d.setDate(22,5,2009)==0) {
            System.out.println(d.getDate());
        }
    }
}


UseMyDate类要改成public的, 也就是main方法的类需要public修饰


public class UseMyDate {
}