I am student just starting to learn java. On one of our little projects I'm working on, I get this compiler error:
myDate2.java:15: error: cannot find symbol
the error has something to do with the "mday/mon/yer" integers (forgive me if I am incorrect) What am I doing wrong? Am I missing a capital letter, or what? Any help will be greatly appreciated!
import java.util.Date;
import javax.swing.*;
public class myDate2
{
private int mmday=0;
private int mmmon=0;
private int myear=0;
private Date mDate;
myDate2()
{
System.out.println("running myDate constructor");
mDate=new mDate();
}
public void dateInt()
{
mday=mDate.getDate(); //1-30
mmon=mDate.getMonth(); //0-11
myer=mDate.getYear()+1900; //Year
}
public void showDate()
{
System.out.println("Day: " + mday + "Month: " + mmon + "Year: " + myer);
}
public static void main(String []arg)
{
myDate obj=new myDate();
obj.showDate(); //mday:0 mmonth:0 year:0
obj.dateInt(); //date variables
obj.showDate();
System.out.println("end of run");
}
}