程序编译提示找不到函数
import java.util.*;import java.util.Date;
public class Example {
public static void main(String []args) {
Calendar calendar=new Calendar.getInstance();
calendar.setTime(new Date());
String year=String.valueOf(calendar.get(Calendar.YEAR)),
month=String.valueOf(calendar.get(Calendar.MONTH)+1),
day=String.valueOf(calendar.get(Calendar.DAY_OF_MONTH)),
week=String.valueOf(calendar.get(Calendar.DAY_OF_WEEK)-1);
int hour=calendar.get(Calendar.HOUR_OF_DAY),
minute=calendar.get(Calendar.MINUTE),
second=calendar.get(Calendar.SECOND);
System.out.println("你现在的系统时间是:");
System.out.println(""+year+"年"+month+"月"+day+"日"+week);
System.out.println(""+hour+minute+second);
}
}
以上程序编译时提示第五行有错误cannot find symbol class getInstance
本人不知道该怎么改了,求助