Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java¿ª·¢ºËÐļ¼ÊõÃæÊÔÐĵ÷ÖÎö

JavaµÄÊý¾Ý½á¹¹ÓÐÄÄЩ£¿MapÓëSetµÄ±¾ÖÊÇø±ðÊÇʲô£¿
·ÖÎö£ºJava³£¼ûµÄÊý¾Ý½á¹¹ÓÐCollectionºÍMap£¬ÆäÖÐCollection½Ó¿ÚÏ°üÀ¨ListºÍSet½Ó¿Ú£¬ÆäÏÂÓÖÓжà¸öʵÏÖÀàÈçListÏÂÓÐArrayList¡¢LinkedListºÍVectorµÈʵÏÖÀ࣬SetÏÂÓÐHashSet¡¢LinkedSetµÈʵÏÖÀàºÍSortedSet½Ó¿Ú£¬HashSetÏÂÓÐLinkedHashSet×ÓÀ࣬SortedSet½Ó¿ÚÏÂÓÐTreeSetʵÏÖÀà¡£Map½Ó¿ÚÏÂÓÐHashMap(ÓÐLinkedHashMap×ÓÀà)¡¢HashTable(ÓÐProperties×ÓÀà)ʵÏÖÀàºÍSortedMap½Ó¿Ú(ÓÐTreeMapʵÏÖÀà)¡£
JAVAµÄÊý¾Ý½á¹¹Ö÷ÒªÓÐList¡¢Set¡¢Map¡¢ArrayList¡¢HashSet¡¢HashMap¡¢PropertiesµÈ¡£
MapÓëSetµÄ±¾ÖÊÇø±ðÓУºSet²»ÄÜ°üº¬Öظ´µÄÔªËØ£¬×î¶àÓÐÒ»¸ö¿ÕÖµ£¬¼Ì³Ð×ÔCollection½Ó¿Ú£¬µ×²ãÊÇMapʵÏÖ»úÖÆ¡£Map²»ÄÜ°üº¬Öظ´µÄ¼ü£¬Ã¿¸ö¼ü×î¶à¶ÔÓ¦Ò»¸öÓ³ÉäµÄÖµ£¬²»ÄÜÓпÕÖµ¼ü¡£Á½½Ó¿ÚÌṩµÄ·½·¨²»ÍêÈ«Ò»Ñù¡£
JavaÖеÄAnnotationµÄ¹¤×÷Ô­ÀíÊÇʲô£¿
AnnotationÌṩһÖÖ»úÖÆ£¬½«³ÌÐòµÄÔªËØÈç:À࣬·½·¨£¬ÊôÐÔ£¬²ÎÊý£¬±¾µØ±äÁ¿£¬°üºÍÔªÊý¾ÝÁªÏµÆðÀ´¡£ÕâÑù±àÒëÆ÷¿ÉÒÔ½«ÔªÊý¾Ý´æ´¢ÔÚClassÎļþÖС£ÕâÑùÐéÄâ»úºÍÆäËü¶ÔÏó¿ÉÒÔ¸ù¾ÝÕâЩԪÊý¾ÝÀ´¾ö¶¨ÈçºÎʹÓÃÕâЩ³ÌÐòÔªËØ»ò¸Ä±äËüÃǵÄÐÐΪ¡£
HttpЭÒ鹤×÷¹ý³Ì¡¢£¿ÎļþÉÏ´«Ê±£¬½ø¶ÈÌõµÄÉè¼ÆÔ­ÀíÊÇʲô£¿
HttpЭÒé¼´³¬Îı¾´«ÊäЭÒ飬ÊôÓÚÓ¦ÓòãµÄÃæÏò¶ÔÏóµÄЭÒé¡£ËüÖ§³Ö¿Í»§/·þÎñÆ÷ģʽ£¬¼òµ¥¿ìËÙ¡¢Áé»î¡¢ÎÞÁ¬½ÓºÍÎÞ״̬¡£httpÇëÇóÓÉÇëÇóÐС¢ÏûÏ¢±¨Í·¡¢ÇëÇóÕýÎÄ×é³É£¬httpÏìÓ¦ÓÉ״̬ÐС¢ÏûÏ¢±¨Í·ºÍÏìÓ¦ÕýÎÄ×é³É¡£
ÎļþÉÏ´«Ê±½ø¶ÈÌõµÄÉè¼ÆÔ­Àí£ºÔÚjavaÖÐÖ÷ÒªÓõ½I/OÔ­Àí£¬ÒÑÉÏ´«µÄÊý¾ÝÖµ³ýÒÔÎļþ×Ü´óСµÄ±ÈÖµ¼´ÊµÊ±½ø¶ÈµÄÖµ¡£Í¨¹ýFileÀà»ñÈ¡ÎļþµÄ×Ü´óС£¬ÔÚ¶ÁÈ¡»òд³öÎļþʱ¼ÓÒ»¸ö½ø¶È¼ÆËãµÄ²½Ö裬ÿ¶ÁÈ¡»òд³öÒ»´Î¾Í¼ÆËã½ø¶ÈÖµ£¬¸üнø¶ÈÌõ¡£
SpringÕûºÏORM¿ò¼Üʱ£¬ÊÂÎñ¹ÜÀíÓÃÄĸöÀࣿÊÇSpring¿ØÖÆÊÂÎñµÄÌá½»»¹ÊÇORM¿ò¼Ü¿ØÖÆ£¿Í¬Ò»ÊÂÎñÖÐÖ´ÐÐÁ½¸ö¸üвÙ×÷£¬ËüµÄ¹¤×÷Ô­ÀíÊÇÔõÑùµÄ£¿
SpringÕûºÏORM¿ò¼ÜʱÊÂÎñ¹ÜÀíÓõÄÊÇÏàÓ¦ORM¿ò¼ÜµÄÊÂÎñ¹ÜÀíÆ÷ÀàÈçHibernate¶ÔÓ¦ÓÚHibernateTransactionManager£¬JPA¶ÔÓ¦ÓÚJpaTransactionManagerµÈ¡£ÕûºÏ¹ýºó¿ÉÅäÖÃÓÉSpring¿ØÖÆÊÂÎñµÄÌá½»¡£ÊÂÎñÌύǰִÐÐÁ½¸ö¸üвÙ×÷¡£Æ乤×÷Ô­ÀíÊDzÉÓÃAOP±à³ÌµÄÔ­ÀíÀ´½øÐпØÖÆ¡£
·Ö²ã¼Ü¹¹ÖУ¬Dao²ãµÄ×÷ÓÃÊÇʲô£¿Èç¹û²»ÒªDAO²ã£¬Äܲ»ÄÜʵÏÖÓÐDao²ãʱµÄÓŵ㣿
Dao²ãÓÖ½ÐÊý¾Ý·ÃÎʶÔÏó²ã, ·â×°Êý¾Ý¿âµÄµ×²ã²Ù×÷ϸ½ÚÈçÊý¾Ý¿âµÄÁ¬½Ó¼°¶ÔÊý¾ÝµÄCRUDµÈ²Ù×÷£¬Ëü²»µ«ÆÁ±ÎÁËÊý¾Ý´æ´¢×îÖÕ½éÖʵIJ»Í


Ïà¹ØÎĵµ£º

JavaÖеÄinstanceof¹Ø¼ü×Ö

instanceofÊÇJavaµÄÒ»¸ö¶þÔª²Ù×÷·û£¬ºÍ==£¬>£¬<ÊÇͬһÀණ¶«¡£ÓÉÓÚËüÊÇÓÉ×Öĸ×é³ÉµÄ£¬ËùÒÔÒ²ÊÇJavaµÄ±£Áô¹Ø¼ü×Ö¡£ËüµÄ×÷ÓÃÊDzâÊÔËü×ó±ßµÄ¶ÔÏóÊÇ·ñÊÇËüÓұߵÄÀàµÄʵÀý£¬·µ»ØbooleanÀàÐ͵ÄÊý¾Ý¡£¾Ù¸öÀý×Ó£º
¡¡¡¡String s = "I AM an Object!";
¡¡¡¡boolean isObject = s instanceof Object;
¡¡¡¡ÎÒÃÇÉùÃ÷ÁËÒ»¸öStrin ......

ÒøÐÐÇ°Öûú³ÌÐò£¨Í¨ÐŲ¿·Ösocket£¬java±àд £©

2009Äê10ÔÂ31ÈÕ ÐÇÆÚÁù 15:32
package Client;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.nio.channels.Il ......

java ipµØַת»»Îª³¤ÕûÐÍ

java ipµØַת»»Îª³¤ÕûÐÍ£»
public class Util {
   
     /**
     * ×Ö·û´®ipת»»Îªlong
     * @param ×Ö·û´®ip
     * @return
     */
    public static long getStr ......

java¶àÏ̵߳ÄЧÂʾÍÒ»¶¨¸ßÂð£¿

   ºÜ¾ÃûÉÏÀ´ÁË£¬·¢ÏÖËäÈ»×ÊÁϺÍÊé¿´µÄºÜ¶à£¬µ«ÊǺܾÃûÅöµÄ¶«Î÷»¹ÊǺÜÈÝÒ×µ­Íü¡£ÒÔºóÏ£ÍûÄܶà¼Ç¼°É¡£
   ½ñÌìÍæÁË°ÑÏ̳߳أ¬²¢¶ÔÆäÖеIJÎÊý×öÁËһЩµ÷Õû£¬²¢¼Ç¼Ôڶಢ·¢Çé¿öÏÂÏß³ÌÊý¶Ô¸÷ÖÖÇé¿öµÄ·´Ó¦¡£³ÌÐòÊÇÍøÉÏÕҵģ¬²¢×÷ÁËÉÔ΢Ð޸ġ£
javaµÄÏ̳߳ØʵÏÖ£¬ThreadPool
package net.zj.hz.yk.thr ......

javaÒì³£¸ÐÊÜ

½ñÌìÀ´½²Ï¹ØÓÚJavaÒì³£ÎÊÌâ¡£ÆäʵÔÚ¿ª·¢¹ý³ÌÖÐJavaµÄÒì³£´¦Àí²¢Ã»ÓÐÏëÏóÖеÄÄÇô¼òµ¥£¬¼òµ¥µÄ˵Java²»×ãÖ®´¦£¬ÄÇôÒì³£´¦Àí»úÖÆÒ²¿ÉÒÔËãÒ»¸ö£¨¸öÈ˹۵㣩¡£ÎªÊ²Ã´ÎÒ»áÕâÑùÈÏΪÄØ£¿ÏÂÃæÎÒ½«ÔÚ¿ª·¢¹ý³ÌÖÐÓÃ×Ô¼ºµÄ˼ά·½Ê½À´½âÊÍÏÂÒ쳣ʹÓá£
JavaµÄÒì³£´óÖ·ÖΪ3Àࣺ
ExceptionÀà¡¢RuntimeExceptionÀàºÍErrorÀ࣬£¨¾ßÌåÒâË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ