Java ÈÕÆÚ¼Ó減
public static void main(String[] args) {
String DATE_FORMAT = "yyyy-MM-dd";
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
DATE_FORMAT);
Calendar c1 = Calendar.getInstance();
c1.set(1999, 0, 14);
System.out.println("Date is : " + sdf.format(c1.getTime()));
c1.add(Calendar.DATE, 366);
System.out.println("Date + 366 days is : "
+ sdf.format(c1.getTime()));
System.out.println("----------------------------");
c1.set(1999, 0, 31);
System.out.println("Date is : " + sdf.format(c1.getTime()));
c1.roll(Calendar.MONTH, false); // Ô·ݼõÈ¥Ò»¸öÔ£¬true Ϊ¼ÓÒ»¸öÔ£¬Äê¡¢ÈÕ²»¶¯
System.out.println("Date roll down 1 month : "
+ sdf.format(c1.getTime()));
c1.set(1999, 2, 31);
System.out.println("Date is : " + sdf.format(c1.getTime()));
c1.add(Calendar.MONTH, -1); // Ô·ݼõÈ¥Ò»¸öÔÂ
System.out.println("Date minus 1 month : "
+ sdf.format(c1.getTime()));
}
Ïà¹ØÎĵµ£º
ÎļþÃû£ºSjis.java
class Sj
{
public static void main(String[] args)
{
}
}
-------------------------------------
Ö´ÐУº
javac Sjis.java
Java Sj
¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢
ÎļþÃû£ºSjis.java
public class Sjis.java
{
public static ......
ת £ºhttp://kuru.javaeye.com/blog/288467
Java¶Ô¶àÏ̵߳ÄÖ§³ÖÓëͬ²½»úÖÆÉîÊÜ´ó¼ÒµÄϲ°®£¬Ëƺõ¿´ÆðÀ´Ê¹ÓÃÁËsynchronized¹Ø¼ü×־ͿÉÒÔÇáËɵؽâ¾ö¶àÏ̹߳²ÏíÊý¾Ýͬ²½ÎÊÌâ¡£µ½µ×ÈçºÎ£¿¨D¨D»¹µÃ¶Ôsynchronized¹Ø¼ü×ÖµÄ×÷ÓýøÐÐÉîÈëÁ˽â²Å¿É¶¨ÂÛ¡£ ×ܵÄ˵À´£¬synchronized¹Ø¼ü×Ö¿ÉÒÔ×÷Ϊº¯ÊýµÄÐÞÊηû£¬Ò²¿É×÷Ϊº¯ÊýÄÚµÄÓï¾ä£¬Ò ......
commons-beanutils-1.8.0.jar²»¼ÓÕâ¸ö°ü
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/DynaBean
commons-collections.jar ²»¼ÓÕâ¸ö°ü
java.lang.NoClassDefFoundError: org/apache/commons/collections/map/ListOrderedMap
commons-lang-2.4.jar²»¼ÓÕâ¸ö°ü
java.lang.NoClassDefFoundError: org/apa ......
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class j5_13 extends Applet implements ActionListener
{
Panel p=new Panel();//н¨²¼¾Ö
Label welcome,la1,li1,la2,li2,lresult;//Ìáʾ±êÇ©,·ûºÅ±êÇ©ÒÔ¼°¼ÆËã½á¹ûµÄ±êÇ©
TextField ta,tb,t ......
AWTÊÇJavaÖÐÖ§³ÖͼÐλ¯Óû§½çÃæGUIÉè¼ÆµÄÒ»¸ö¹¤¾ß¼¯¡£AWTµÄAPIÊǶÀÁ¢ÓÚƽ̨µÄ£¬µ«Éè¼Æ³öÀ´µÄ½çÃæÔÚ¸÷ÖÖƽ̨µÄ·ç¸ñ²»Í¬£¬ÀûÓÃAPIÖи÷ÖÖÀàÔÚÌض¨Æ½Ì¨ÏµĶԵÈ×é¼þpeersÌṩ¾ßÌåƽ̨ϵÄʵÏÖ¡£
Óû½¨Á¢Ò»¸öGUIÊ×ÏÈÈ·¶¨ËùÓõÄ×é¼þ¼°Æä²¼¾Ö£¬È»ºóʵÏÖÆäʼþµÄÏìÓ¦¡£×é¼þµÄÀàÐÍÓжàÖÖ£¬Èç³£ÓõÄButton¡¢CheckBoxµÈ£¬¾ùΪComponent ......