请问我该怎么改,才能正确显示汉字啊!
拜托!!!小弟才学的!没有办法啊
附程序:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=GB2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title>
时钟显示
</title>
</head>
<body>
<center>
<h1>
<font color="blue">
显示时钟
</font>
</h1>
<hr>
<%@ page import="java.util.*"%>
<%
int year;
int month;
int day;
int am_pm;
int hour;
int min;
int sec;
GregorianCalendar timenow=new GregorianCalendar();
year=timenow.get(Calendar.YEAR);
month=timenow.get(Calendar.MONTH);
day=timenow.get(Calendar.DAY_OF_MONTH);
am_pm=timenow.get(Calendar.AM_PM);
hour=timenow.get(Calendar.HOUR);
min=timenow.get(Calendar.MINUTE);
sec=timenow.get(Calendar.SECOND);
out.println("<h2>北京时间</h2>");
out.println("现在是"+year+"年");
out.println(month+"月");
out.println(day+"日");
if(am_pm=0)
out.print("AM"+hour+"时");
else
out.print("PM"+hour+"时");
out.print(min+"分");
out.print(sec+"秒");
%>
</center>
</body>
</html>