java ¼¯ºÏÀà
1.1.1. ¼¯ºÏ¿ò¼ÜÖеĽӿÚ
Ëùν¿ò¼Ü¾ÍÊÇÒ»¸öÀà¿âµÄ¼¯ºÏ¡£¼¯ºÏ¿ò¼Ü¾ÍÊÇÒ»¸öÓÃÀ´±íʾºÍ²Ù×÷¼¯ºÏµÄͳһµÄ¼Ü¹¹£¬°üº¬ÁËʵÏÖ¼¯ºÏµÄ½Ó¿ÚÓëÀà¡£
* Collection£º¼¯ºÏ²ã´ÎÖеĸù½Ó¿Ú£¬JDKûÓÐÌṩÕâ¸ö½Ó¿ÚÖ±½ÓµÄʵÏÖÀà¡£
* Set£º²»ÄÜ°üº¬Öظ´µÄÔªËØ¡£SortedSetÊÇÒ»¸ö°´ÕÕÉýÐòÅÅÁÐÔªËصÄSet¡£
* List£ºÊÇÒ»¸öÓÐÐòµÄ¼¯ºÏ£¬¿ÉÒÔ°üº¬Öظ´µÄÔªËØ¡£ÌṩÁË°´Ë÷Òý·ÃÎʵķ½Ê½¡£
* Map£º°üº¬ÁËkey-value¶Ô¡£Map²»ÄÜ°üº¬Öظ´µÄkey¡£SortedMapÊÇÒ»¸ö°´ÕÕÉýÐòÅÅÁÐkeyµÄMap¡£
1.1.2. ArrayList
* ArrayList£ºÎÒÃÇ¿ÉÒÔ½«Æä¿´×÷ÊÇÄܹ»×Ô¶¯Ôö³¤ÈÝÁ¿µÄÊý×é¡£
* ÀûÓÃArrayListµÄtoArray()·µ»ØÒ»¸öÊý×é¡£
* Arrays.asList()·µ»ØÒ»¸öÁÐ±í¡£
* µü´úÆ÷(Iterator) ¸øÎÒÃÇÌṩÁËÒ»ÖÖͨÓõķ½Ê½À´·ÃÎʼ¯ºÏÖеÄÔªËØ
1.1.3. CollectionÀà
* ÅÅÐò£ºCollections.sort()
£¨1£©×ÔÈ»ÅÅÑ°(natural ordering )£»
£¨2£©ÊµÏֱȽÏÆ÷(Comparator)½Ó¿Ú¡£
* È¡×î´óºÍ×îСµÄÔªËØ£ºCollections.max()¡¢Collections.min()¡£
* ÔÚÒÑÅÅÐòµÄListÖÐËÑË÷Ö¸¶¨µÄÔªËØ£ºCollectons.binarySearch()¡£
1.1.4. LinkedList
* LinkedListÊDzÉÓÃË«ÏòÑ»·Á´±íʵÏֵġ£
* ÀûÓÃLinkedListʵÏÖÕ»(stack)¡¢¶ÓÁÐ(queue)¡¢Ë«Ïò¶ÓÁÐ(double-ended queue )
1.1.5. Êý¾Ý½á¹¹
Ò»°ã½«Êý¾Ý½á¹¹·ÖΪÁ½´óÀࣺÏßÐÔÊý¾Ý½á¹¹ºÍ·ÇÏßÐÔÊý¾Ý½á¹¹¡£ÏßÐÔÊý¾Ý½á¹¹ÓÐÏßÐÔ±í¡¢Õ»¡¢¶ÓÁС¢´®¡¢Êý×éºÍÎļþ£»·ÇÏßÐÔÊý¾Ý½á¹¹ÓÐÊ÷ºÍͼ
1.1.6. ÏßÐÔ±í
* ÏßÐÔ±íµÄÂß¼½á¹¹ÊÇn¸öÊý¾ÝÔªËصÄÓÐÏÞÐòÁÐ:
(a1, a2 ,a3,…an)
nΪÏßÐÔ±íµÄ³¤¶È(n≥0)£¬n=
Ïà¹ØÎĵµ£º
/**
* @author he
*
*
* °ÑDateת»»³ÉString£¬ÒÔyyyy-MM-dd HH:mm:ssµÄÐÎʽÏÔʾ
*/
public static String DateToString(Date tempDate) {
......
Ò».°¢ÀïÑз¢Ôº-º¼ÖÝ-Java¸ß¼¶³ÌÐòÔ±
ÈËÊý£º1ÈË
ѧÀú£º±¾¿Æ¼°ÒÔÉÏ
¹¤×÷µØµã£ºº¼ÖÝ
ְλÃèÊö:
1¡¢ Éè¼Æ¡¢¿ª·¢¡¢¸Ä½ø»ùÓÚJavaµÄ¹¤¾ßºÍ¿ò¼Ü£»
2¡¢ Ö¸µ¼¿ª·¢ÍŶÓʹÓù¤¾ßºÍ¿ò¼Ü£¬½â¾öÒÉÄÑÎÊÌâ¡£
ְλҪÇó£º
1¡¢ ÊìϤ²¢×ÔÈçÔËÓÃJavaÓïÑÔ¼°JDKÀà¿â£¬¾ß±¸Á¼ºÃµÄ±à³ÌÏ°¹ß£»
2¡¢ ÊìϤ¶àÖÖJava¿ªÔ´ÏîÄ¿£¬¾«Í¨Ä¿Ç°Ö÷Á ......
UIManager.setLookAndFeel(“
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
”);//windowsĬÈÏ
UIManager.put("MenuBar.font", font);//¸ø¿Ø¼þÉèÖÃ×ÖÌå
static Object
put
(Object
key, Object
value)
public static void setLookAndFeel(String className, jav ......
Ç°Á½ÌìѧµÄÊÇjavaµÄ»ù´¡ÒÔ¼°ÔõôÅäÖÃJDK
public class Information{
public static void main(String args[]){
System.out.println("ÐÕÃû£º"+"asf");
System.out.println("ÐÔ±ð£º"+"m");
&n ......
Java¹æÔòÒýÇ湤×÷ÔÀí¼°ÆäÓ¦ÓÃ
¡¡¡¡Õª Òª Java¹æÔòÒýÇæÊÇÒ»ÖÖǶÈëÔÚJava³ÌÐòÖеÄ×é¼þ£¬ËüµÄÈÎÎñÊǰѵ±Ç°Ìá½»¸øÒýÇæµÄJavaÊý¾Ý¶ÔÏóÓë¼ÓÔØÔÚÒýÇæÖеÄÒµÎñ¹æÔò½øÐвâÊԺͱȶԣ¬¼¤»îÄÇЩ·ûºÏµ±Ç°Êý¾Ý״̬ϵÄÒµÎñ¹æÔò£¬¸ù¾ÝÒµÎñ¹æÔòÖÐÉùÃ÷µÄÖ´ÐÐÂß¼£¬´¥·¢Ó¦ÓóÌÐòÖжÔÓ¦µÄ²Ù×÷¡£
¡¡¡¡ÒýÑÔ
¡¡¡¡Ä¿Ç°£¬JavaÉçÇøÍƶ¯²¢·¢Õ¹Á ......