Java 7ÒѾÍê³ÉµÄÆß´óй¦ÄÜÔ¤ÀÀ
Java 7ÒѾÍê³ÉµÄÆß´óй¦ÄÜÔ¤ÀÀzz
2009-12-12 09:15
×î½üµÄDevoxx´ó»áÉÏ£¬Java 7½«°üº¬±Õ°üµÄÏûÏ¢ÁîºÜ¶àÈ˸е½Õñ·Ü——Õ⽫×öΪһ¸ö¶ÀÁ¢µÄJSR±»ÊµÏÖ¡£ÔÚÖÚ¶àJava 7еÄÓïÑÔÌØÐÔÖУ¬ÓÐһЩÏÖÔÚÒѾÍê³ÉÁË¡£Devoxx´ó»áµÄһλ²Î»áÕßÔÚ²©¿ÍÖб¨¸æÁËÏÂÃæÕâЩJava 7ÒѾÍê³ÉµÄ7´óй¦ÄÜ£º
1£©¶Ô¼¯ºÏÀàµÄÓïÑÔÖ§³Ö£»
2£©×Ô¶¯×ÊÔ´¹ÜÀí£»
3£©¸Ä½øµÄͨÓÃʵÀý´´½¨ÀàÐÍÍƶϣ»
4£©Êý×Ö×ÖÃæÁ¿Ï»®ÏßÖ§³Ö£»
5£©switchÖÐʹÓÃstring£»
6£©¶þ½øÖÆ×ÖÃæÁ¿£»
7£©¼ò»¯¿É±ä²ÎÊý·½·¨µ÷Óá£
¡¡¡¡ÏÂÃæÎÒÃÇÀ´×Ðϸ¿´Ò»ÏÂÕâ7´óй¦ÄÜ£º
¡¡¡¡¶Ô¼¯ºÏÀàµÄÓïÑÔÖ§³Ö
¡¡¡¡Java½«°üº¬¶Ô´´½¨¼¯ºÏÀàµÄµÚÒ»ÀàÓïÑÔÖ§³Ö¡£ÕâÒâζ׿¯ºÏÀàµÄ´´½¨¿ÉÒÔÏñRubyºÍPerlÄÇÑùÁË¡£
¡¡¡¡Ô±¾ÐèÒªÕâÑù£º
1. List<String> list = new ArrayList<String>();
2. list.add("item");
3. String item = list.get(0);
4.
5. Set<String> set = new HashSet<String>();
6. set.add("item");
7.
8. Map<String, Integer> map = new HashMap<String, Integer>();
9. map.put("key", 1);
10. int value = map.get("key");
¡¡¡¡ÏÖÔÚÄã¿ÉÒÔÕâÑù£º
1. List<String> list = ["item"];
2. String item = list[0];
3.
4. Set<String> set = {"item"};
5.
6. Map<String, Integer> map = {"key" : 1};
7. int value = map["key"];
¡¡¡¡ÕâЩ¼¯ºÏÊDz»¿É±äµÄ¡£
¡¡¡¡×Ô¶¯×ÊÔ´¹ÜÀí
¡¡¡¡JavaÖÐijЩ×ÊÔ´ÊÇÐèÒªÊÖ¶¯¹Ø±ÕµÄ£¬ÈçInputStream£¬Writes£¬Sockets£¬Sql classesµÈ¡£Õâ¸öеÄÓïÑÔÌØÐÔÔÊÐítryÓï¾ä±¾ÉíÉêÇë¸ü¶àµÄ×ÊÔ´£¬ÕâЩ×ÊÔ´×÷ÓÃÓÚtry´úÂë¿é£¬²¢×Ô¶¯¹Ø±Õ¡£
¡¡¡¡Õâ¸ö£º
1. BufferedReader br = new BufferedReader(new FileReader(path));
2. try {
3. &nbs
Ïà¹ØÎĵµ£º
package fileTest;
import java.io.*;
public class FileOperate {
public FileOperate() {
}
public static void main(String args[]){
// newFolder("D:/100");
moveFile("e:/978 ......
ÔÚAndroidµÄÓ¦ÓóÌÐò¿ª·¢ÖУ¬Í¨³£Ê¹ÓõÄÊÇJAVAÓïÑÔ£¬³ýÁËÐèÒªÊìϤJAVAÓïÑԵĻù´¡ÖªÊ¶Ö®Í⣬»¹ÐèÒªÁ˽âAndroidÌṩµÄÀ©Õ¹µÄJAVA¹¦ÄÜ¡£
ÔÚÒ»°ãµÄJAVAÓ¦ÓÃÖУ¬Èç¹ûÐèÓÃÒýÓûù´¡Àà¿â£¬Í¨³£ÐèҪʹÓÃÈçϵķ½Ê½£º
import
javax.swing.*;
ÒÔÉÏ´úÂë±íʾÁËÒýÓÃJAVAµÄGUI×é¼þSwing,javax.swing¼´JAVAÖеÄÒ»¸ö°ü¡£
androidÌá¹©Ò ......
java ´úÂë
package util;
import java.io.UnsupportedEncodingException;
import dao.socket.OperType;
public class Encrpt {
private String key;
public Encrpt() {
this("sitow");
}
public Encrpt(String key) {
this.key = key;
}
private ......
¿ìÅÅ£º¿ìËÙÅÅÐò£¬ÄѶȲ»ÊÇÌ«´ó£¬µ«ÊÇÊÇÎÒ¾³£°ÑÍæµÄС´úÂëÖ®Ò»£¬ÒýÓÿìÅÅ´úÂ봴ʼÈ˵ÄÒ»¾ä»°“Òª²»ÊǼòÁ·ÓÖÃ÷ÏÔûÓдíÎó£¬Òª²»ÊǸ´ÔÓûÓÐÃ÷ÏԵĴíÎó”
ÆðÒò£º
Ö÷ÒªÊÇÇ°Ò»Õó¿´ÁõÈê¼ÑµÄ¡¶Ëã·¨ÒÕÊõÓëÐÅϢѧ¾ºÈü¡·P73Ò³£¬ÅöÇÉÎÒÓÖÇ×ÊÖдÁËÒ»±éÄÇÊéÉϵIJâÊÔÁËһϣ¬·¢ÏÖ¾¹È»ÊÇ´íÎóµÄ£¬È»ºóÎÒÓÖ²âÊÔÁËÒ»ÏÂÎÒÒÔÇ ......
ÿ¸ö³õѧÕ߶¼Ó¦¸Ã¸ã¶®µÄÎÊÌ⣡¶ÔÓÚÕâ¸öϵÁÐÀïµÄÎÊÌ⣬ÿ¸öѧJavaµÄÈ˶¼Ó¦¸Ã¸ã¶®¡£µ±È»£¬Èç¹ûÖ»ÊÇѧJavaÍæÍæ¾ÍÎÞËùνÁË¡£Èç¹ûÄãÈÏΪ×Ô¼ºÒѾ³¬Ô½³õѧÕßÁË£¬È´²»ºÜ¶®ÕâЩÎÊÌ⣬Ç뽫Äã×Ô¼ºÖعé³õѧÕßÐÐÁС£ÄÚÈݾùÀ´×ÔÓÚCSDNµÄ¾µäÀÏÌù¡£
ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄÊÂÇ飬µ«Ê ......