javaʵÏÖ¶ÔÊý¾Ý¿âÈÕÆÚÌìÊýµÄ´¦Àí
public static void main(String[] args) throws ParseException {
String str = "yyyy-MM-dd 00:00:00.0";
String str1 = str.substring(0, 10);
/*
* ½«yyyy-1-1ת»»³Éyyyy-01-01
*/
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = sdf.parse(str1);
String str2 = sdf.format(date);
String year = str2.substring(0, 4);
String month = str2.substring(5, 7);
String day = str2.substring(8, 10);
Calendar c = Calendar.getInstance();
c.set(Integer.parseInt(year), Integer.parseInt(month), Integer
.parseInt(day));
/*
* ÈÕÆÚ¼Ó1£¬È翪ʼÊÇyyyyÄê1ÔÂ1ÈÕ£¬´¦Àíºó¾ÍÊÇyyyyÄê1ÔÂ2ÈÕ
*/
c.add(Calendar.DAY_OF_MONTH, 1);
year = Integer.toString(c.get(Calendar.YEAR));
month = Integer.toString(c.get(Calendar.MONTH));
day = Integer.toString(c.get(Calendar.DATE));
String newDate = year + "-" + month + "-" + day;
System.out.println(newDate);
}
Ïà¹ØÎĵµ£º
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class LRU {
int blockCount;
int seriaCount;
int[] address;
int[] stack;
BufferedReader br;
public static void main(String[] args) {
// int address[] = { 1, 2,3, 2, 8, 4, 3 ......
¶ÔÏóÐòÁл¯¾ÍÊǰѶÔÏóдÈëµ½Êä³öÁ÷ÖУ¬ÓÃÀ´´æ´¢»òÕß´«Êä¡£
¶ÔÏóµÄ·´ÐòÁл¯¾ÍÊÇ´ÓÊäÈëÁ÷ÖжÁÈ¡¶ÔÏó¡£
ÒªÐòÁл¯µÄ¶ÔÏóÓ¦¸ÃʵÏÖSerializable½Ó¿Ú¡£
Serializable½Ó¿ÚÊÇÒ»¸ö±êʶ½Ó¿Ú£¬Ã»ÓгéÏó·½·¨¡£
SerializableÓÐÒ»¸ö× ......
JavaÊÇÓÉSUN Microsystem¹«Ë¾¿ª·¢µÄ¡¢ÓÉC++·¢Õ¹¶øÀ´µÄÒ»ÖÖÃæÏò¶ÔÏóµÄͨÓóÌ
ÐòÉè¼ÆÓïÑÔ¡£Java²¢²»ÊÇרÃÅΪInternet¶ø¿ª·¢µÄ£¬µ«ËüµÄ³öÏÖµÄȷΪInternetºÍWWW
¿ª±ÙÁËÒ»¸öոеÄʱ´ú¡£Ëü¾ßÓÐÒÔÏÂһЩÌص㣻¼òµ¥¡¢ÃæÏò¶ÔÏó¡¢·Ö²¼Ê½¡¢Ç¿×³¡¢°²È«¡¢
Óë²Ù×÷ƽ̨Î޹ء¢¸ßÐÔÄÜ¡¢¶àÏß³ÌÒÔ¼°¶¯Ì¬ÐÔ¡£ ......
package com.color.program;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class CompareTime {
public static void main(String[] args){
String t1 = "2008-05-09";
String t2 = "20 ......