java Preferences³Ö¾Ã»¯Ê¹ÓÃʾÀý
jdk1.4ÒýÈëÁËPreferences API£¬Ëü±È¶ÔÏóÐòÁл¯¸ü½Ó½üÓڳ־û¯£¬ÒòΪËü¿ÉÒÔ×Ô¶¯´æÈ¡ºÍ¶ÁÈ¡ÐÅÏ¢¡£PreferencesÀàËÆÓÚ¼üÖµ¶Ô£¬´æÈ¡ÔÚÒ»¸ö½Úµã²ãÎö½á¹¹ÖУ¬²»¹ýËüÖ»ÄÜ´æÈ¡ÔʼÊý¾ÝÀàÐͺÍ×Ö·û´®£¬Ã¿¸ö×Ö·û´®µÄ³¤¶È²»Äܳ¬¹ý8k¡£
import java.util.prefs.Preferences;
public class PreferencesDemo {
public static void main(String []args){
Preferences pre = Preferences.userNodeForPackage(PreferencesDemo.class);
int userCount = pre.getInt("UserCount", 0);
userCount++;
pre.putInt("UserCount", userCount);
System.out.println(pre.getInt("UserCount", 0));
}
}
µÚÒ»´ÎÔËÐеÄʱºòÊÇ1£¬µÚ¶þ´ÎÔËÐоͱä³É2£¬µÚÈý´Î¾Í±ä³É3£¬Preferences API²¢Ã»ÓÐÉú³ÉÈκα¾µØÎļþ£¬µ«È´±£´æÁËÐÅÏ¢£¬ÎÒÃÇÒ²²»ÐèÒª¹ØÐIJÙ×÷ϵͳÊÇÈçºÎÔË×÷µÄ¡£
Ïà¹ØÎĵµ£º
×÷ÕߣºÔËÆø
email: webmaster@chinaspx.com
ÈÕÆÚ£º7/1/2001 10:10:46 PM
Java±à³ÌÖеÄÒì³£´¦ÀíÊÇÒ»¸öºÜ³£¼ûµÄ»°ÌâÁË£¬¼¸ºõÈκÎһÎéÉÜÐÔµÄJava¿Î³Ì¶¼»áÌáµ½Òì³£´¦Àí¡£²»¹ý£¬ÎÒÈÏΪºÜ¶àÈËÆäʵ²¢Ã»ÓÐÕæÕýÕÆÎÕÕýÈ·´¦ÀíÒì³£Çé¿öµÄ·½·¨ºÍ²ßÂÔ£¬×î¶àÒ²¾Í²»¹ýÁ˽â¸ö´ó¸Å£¬ÖªµÀµã¸ÅÄî¡£±¾ÎľͶÔÈýÖÖ²»Í¬³Ì¶ÈºÍÖÊÁ¿µÄJavaÒì³£´¦À ......
String usrHome = System.getProperty("user.home");
ÏÂÃæÊÇSystemµÄ²ÎÊýÁбí
Key Meaning
------------------- ---------------------- ......
Java·¢Õ¹µ½ÏÖÔÚ£¬°´Ó¦ÓÃÀ´·ÖÖ÷Òª·ÖΪÈý´ó¿é£ºJ2SE,J2MEºÍJ2EE¡£ÕâÈý¿éÏ໥²¹³ä£¬Ó¦Ó÷¶Î§²»Í¬¡£
J2SE¾ÍÊÇJava2µÄ±ê×¼°æ£¬Ö÷ÒªÓÃÓÚ×ÀÃæÓ¦ÓÃÈí¼þµÄ±à³Ì£»
J2MEÖ÷ÒªÓ¦ÓÃÓÚǶÈëÊÇϵͳ¿ª·¢£¬ÈçÊÖ»úºÍPDAµÄ±à³Ì£»
J2EEÊÇJava2µÄÆóÒµ°æ£¬Ö÷ÒªÓÃÓÚ·Ö²¼Ê½µÄÍøÂç³ÌÐòµÄ¿ª·¢£¬Èçµç×ÓÉÌÎñÍøÕ¾ºÍERPϵͳ¡£
ÏÈѧϰj2se
Ҫѧϰj2ee¾ÍÒ ......
1.ÄãÐèÒª¾«Í¨ÃæÏò¶ÔÏó·ÖÎöÓëÉè¼Æ(OOA/OOD)¡¢É漰ģʽ(GOF£¬J2EEDP)ÒÔ¼°×ÛºÏģʽ¡£ÄãÓ¦¸ÃÊ®·ÖÁ˽âUML£¬ÓÈÆäÊÇclass£¬object£¬interactionÒÔ¼°statediagrams¡£
¡¡¡¡2.ÄãÐèҪѧϰJAVAÓïÑԵĻù´¡ÖªÊ¶ÒÔ¼°ËüµÄºËÐÄÀà¿â(collections£¬serialization£¬streams£¬networking£¬ multithreading ......