JSp页面显示当前月有几周每一周从几号到几号 RT 该如何做,在table里显示当前月有几周 每一周是从几号到几号。谢谢 请各位达人帮解答 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 package javac;import java.util.Calendar;import java.util.Scanner;public class StydyCalendar { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Calendar calendar = Calendar.getInstance(); Integer year = null; Integer month = null; Integer day = 1; Integer weekday = null; again: while (true) { System.out.print("请输入年份:"); year = scanner.nextInt(); if (year < 0) { System.err.println("系统错误:年份不可小于0"); break again; } System.out.print("请输入月份:"); month = scanner.nextInt(); if (month < 0 || month > 13) { System.err.println("系统错误:月份不可小于0 并且不能大于12"); break again; } calendar.set(year, --month, day); weekday = calendar.get(Calendar.DAY_OF_WEEK); System.out.println("Sun Mon Tue Wed Thu Fri Sat "); for (int i = 0; i < (weekday - 1); i++) { System.out.print(" "); } while (calendar.get(Calendar.MONTH) == month) { if (calendar.get(Calendar.DAY_OF_MONTH) < 10) { System.out.print(" "); } System.out.print(calendar.get(Calendar.DAY_OF_MONTH) + " "); if (calendar.get(Calendar.DAY_OF_WEEK) % 7 == 0) { System.out.println(); } calendar.add(Calendar.DAY_OF_MONTH, 1); } System.out.println(); } }}娱乐代码 我就不给LZ改了 可运行 意思大概就是这个意思 直接用框架的属性啊 比如说:struts2或者说 直接用日期控件 Servlet问题,急求解决!!! spring annotation注入继承的属性 hibernate 实体查询要注意点什么 请m_m1m2m3m4m5毛大军进,谢谢 管理员被删谢谢... JSF高手请进,问题急救 为什么我装了tomcat之后无法在其他目录下运行startup 写好了一个ejb,文件acme_ejb.jar,发布在weblogic 8.1下了,如何在别的机器上访问他? struts 的疑问,急!!! 大侠救命 form中action的值写法问题 Servlelt中文乱码问题 hibernate 级联删除的问题
package javac;import java.util.Calendar;
import java.util.Scanner;public class StydyCalendar {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Calendar calendar = Calendar.getInstance(); Integer year = null;
Integer month = null;
Integer day = 1;
Integer weekday = null; again: while (true) {
System.out.print("请输入年份:");
year = scanner.nextInt();
if (year < 0) {
System.err.println("系统错误:年份不可小于0");
break again;
} System.out.print("请输入月份:");
month = scanner.nextInt();
if (month < 0 || month > 13) {
System.err.println("系统错误:月份不可小于0 并且不能大于12");
break again;
} calendar.set(year, --month, day);
weekday = calendar.get(Calendar.DAY_OF_WEEK); System.out.println("Sun Mon Tue Wed Thu Fri Sat "); for (int i = 0; i < (weekday - 1); i++) {
System.out.print(" ");
} while (calendar.get(Calendar.MONTH) == month) {
if (calendar.get(Calendar.DAY_OF_MONTH) < 10) {
System.out.print(" ");
}
System.out.print(calendar.get(Calendar.DAY_OF_MONTH) + " ");
if (calendar.get(Calendar.DAY_OF_WEEK) % 7 == 0) {
System.out.println();
}
calendar.add(Calendar.DAY_OF_MONTH, 1);
}
System.out.println();
}
}}
娱乐代码 我就不给LZ改了 可运行 意思大概就是这个意思
或者说 直接用日期控件