public class Date4_3
{
	//Ա	
	private int year,month,day;	
	//޲Ĺ췽
	public Date4_3(){}
	//вĹ췽ֱӸֵԱ
	public Date4_3(int y,int m,int d)
	{
		year=y;
		month=m;
		day=d;
	}
	//вĹ췽ݣ"2012/12/25"ֵԱ
	public Date4_3(String str)
	{
		String[] date=str.split("/");
		year=Integer.parseInt(date[0]);
		month=Integer.parseInt(date[1]);
		day=Integer.parseInt(date[2]);
	}	
	//Ա
	public void printDate()			//Ϣ
	{	
		System.out.println(year+"-"+month+"-"+day);
	}	
	public static void main(String[] args)
	{	
		Date4_3 d1=new Date4_3();				
		Date4_3 d2=new Date4_3(2000,1,1);	
		Date4_3 d3=new Date4_3("2012/12/25");
		d1.printDate();
		d2.printDate();	
		d3.printDate();
	}
}
