javaʱ¼äºÍÈÕÆÚÀ©Õ¹
±¾ÈË֮ǰ×öµÄÏîÄ¿ÖлýÀÛ³£ÓõÄʱ¼ä·½·¨£¬Ìù³öÀ´Óë´ó¼Ò¹²Ïí£¬Èç¹ûÄÄÀïÓдíÎó»ò¸üÓÐЧµÄ·½·¨Ç뾡¹ÜÅÄש£¡¹þ¹þ
Java´úÂë
package com.hefeng.test;
import java.text.DateFormat;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public class TimeTest {
//ÓÃÀ´È«¾Ö¿ØÖÆ ÉÏÒ»ÖÜ£¬±¾ÖÜ£¬ÏÂÒ»ÖܵÄÖÜÊý±ä»¯
private int weeks = 0;
private int MaxDate;//Ò»ÔÂ×î´óÌìÊý
private int MaxYear;//Ò»Äê×î´óÌìÊý
/**
* @param args
*/
public static void main(String[] args) {
TimeTest tt = new TimeTest();
System.out.println("»ñÈ¡µ±ÌìÈÕÆÚ:"+tt.getNowTime("yyyy-MM-dd"));
System.out.println("»ñÈ¡±¾ÖÜÒ»ÈÕÆÚ:"+tt.getMondayOFWeek());
System.out.println("»ñÈ¡±¾ÖÜÈÕµÄÈÕÆÚ~:"+tt.getCurrentWeekday());
System.out.println("»ñÈ¡ÉÏÖÜÒ»ÈÕÆÚ:"+tt.getPreviousWeekday());
System.out.println("»ñÈ¡ÉÏÖÜÈÕÈÕÆÚ:"+tt.getPreviousWeekSunday());
System.
Ïà¹ØÎĵµ£º
ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
< ......
Ò»¡¢ÔËÐÐclassÎļþ
Ö´Ðдømain·½·¨µÄclassÎļþ£¬ÃüÁîÐÐΪ£º
java <CLASSÎļþÃû>
×¢Ò⣺CLASSÎļþÃû²»Òª´øÎļþºó׺.class
ÀýÈ磺
java Test
Èç¹ûÖ´ÐеÄclassÎļþÊÇ´ø°üµÄ£¬¼´ÔÚÀàÎļþÖÐʹÓÃÁË£º
package <°üÃû>
ÄÇÓ¦¸ÃÔÚ°üµÄ»ù·¾¶ÏÂÖ´ÐУ¬ÃüÁîÐÐΪ£º
java <°üÃû>.CLASSÎļþ ......
¼òµ¥µÄ˵µ¥Àý¾ÍÊÇ Ö»ÄÜÓÐÒ»¸öʵÀý£¬ËùÒԵط½Óõ½µÄʵÀý¶¼ÊÇͬһ¸ö¡£
¾ÍºÃÏñ¼ÒÈ˳Է¹£¬×À×ÓÊǵ¥ÀýµÄ£¬´ó¼ÒÓõÄÊÇͬһ¸ö¡£¶øÍëÊǶàÀýµÄ£¬Ã¿È˶¼ÓÐ×Ô¼¸µÄ¡£ ÏÂÃæÊǾßÌåµÄÀý×Ó£º
Javaģʽ֮µ¥Àýģʽ£º
µ¥Àýģʽȷ±£Ò»¸öÀàÖ»ÓÐÒ»¸öʵÀý£¬×ÔÐÐÌṩÕâ¸öʵÀý²¢ÏòÕû¸öÏµÍ ......
JAVA³ÌÐòÔ±ÃæÊÔÖ®¿û»¨±¦µä
1¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏ󣺳éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ ......
×°ÊÎÆ÷ģʽÖ÷ÒªÓ¦ÓÃÓÚÕâÑùÒ»ÖÖ³¡ºÏ£¬µ±ÄãÒѾÓÐÁËÒ»¸öÄ¿±êÀ࣬²¢ÇÒËüÊÇÒ»¸ö½Ó¿ÚµÄʵÏÖÀ࣬ÔÚ¶Ô¸ÃÀàʹÓõĺóÆÚ·¢ÏÖÐèÒª¶ÔÏàÓ¦½Ó¿Ú³ÌÐòµÄÇ°ºó×ö¸ü¶àµÄ´¦Àí£¬ÕâЩ´¦ÀíÊDZ仯µÄ£¬²»¹Ì¶¨µÄ£¬µ«ÊÇÓв»ÄÜÈ¥ÐÞ¸ÄÕâ¸öÄ¿±êÀ࣬ÕâʱÎÒÃǾͿÉÒÔʹÓÃÕâ¸ö×°ÊÎÆ÷ģʽ£º
±ÈÈ磬ÎÒÃÇÒѾÓÐÒ»¸ö¸¶¿îµÄ·½·¨ payMoney(long count) £¬Õâ¸ö·½·¨Ö» ......