Java·ºÐ;Žë
1¡¢²»¿ÉÒÔÓÃÒ»¸ö±¾µØÀàÐÍ£¨Èçint float£©À´Ìæ»»·ºÐÍ
2¡¢ÔËÐÐʱÀàÐͼì²é£¬²»Í¬ÀàÐ͵ķºÐÍÀàÊǵȼ۵ģ¨Pair<String>ÓëPair<Employee>ÊÇÊôÓÚͬһ¸öÀàÐÍPair£©£¬
ÕâÒ»µãÒªÌرð×¢Ò⣬¼´Èç¹ûa instanceof Pair<String>==trueµÄ»°£¬²¢²»´ú±ía.getFirst()µÄ·µ»ØÖµÊÇÒ»¸öStringÀàÐÍ
3¡¢·ºÐÍÀ಻¿ÉÒԼ̳ÐExceptionÀ࣬¼´·ºÐÍÀ಻¿ÉÒÔ×÷ΪÒì³£±»Å׳ö
4¡¢²»¿ÉÒÔ¶¨Òå·ºÐÍÊý×é
5¡¢²»¿ÉÒÔÓ÷ºÐ͹¹Ôì¶ÔÏ󣬼´first = new T(); ÊÇ´íÎóµÄ
6¡¢ÔÚstatic·½·¨Öв»¿ÉÒÔʹÓ÷ºÐÍ£¬·ºÐͱäÁ¿Ò²²»¿ÉÒÔÓÃstatic¹Ø¼ü×ÖÀ´ÐÞÊÎ
7¡¢²»ÒªÔÚ·ºÐÍÀàÖж¨Òåequals(T x)ÕâÀà·½·¨£¬ÒòΪObjectÀàÖÐÒ²ÓÐequals·½·¨£¬µ±·ºÐÍÀà±»²Á³ýºó£¬ÕâÁ½¸ö·½·¨»á³åÍ»
8¡¢¸ù¾Ýͬһ¸ö·ºÐÍÀàÑÜÉú³öÀ´µÄ¶à¸öÀàÖ®¼äûÓÐÈκιØϵ£¬²»¿ÉÒÔ»¥Ïำֵ
¼´Pair<Number> p1; Pair<Integer> p2; p1=p2; ÕâÖÖ¸³ÖµÊÇ´íÎóµÄ¡£
9¡¢Èôij¸ö·ºÐÍÀ໹ÓÐͬÃûµÄ·Ç·ºÐÍÀ࣬²»Òª»ìºÏʹÓ㬼á³ÖʹÓ÷ºÐÍÀà
Pair<Manager> managerBuddies = new Pair<Manager>(ceo, cfo);
Pair rawBuddies = managerBuddies; ÕâÀï±àÒëÆ÷²»»á±¨´í£¬µ«´æÔÚ×ÅÑÏÖصÄÔËÐÐʱ´íÎóÒþ»¼
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
¿ÉÄÜ´ó¶àÊýJsp¿ª·¢Ô±ÔÚдÍê³ÌÐò²âÊÔͨ¹ýºó£¬²»Ì«»á¹Ø×¢JspÉú³ÉµÄJavaÎļþ£¬Æäʵ£¬Í¨¹ýJava´úÂ룬¸üÄÜÌåÏÖ³ÌÐò´úÂëµÄÕæÕýº¬Ò壬¶Ô½øÒ»²½Ñо¿³ÌÐò´úÂëµÄºǫ́ÔËÐÐÇé¿öÊǷdz£ÓаïÖúµÄ¡£ÀýÈ磬ÓÃJsp±àд´úÂëʱ£¬ÓÐʱºòÓÃ<%! %>£¬ÓÐʱºòÓÃ<% %>£¬¼Ó²»¼Ó¸Ð̾º ......
ÖµÀàÐÍÊÇ´æ´¢ÔÚÄÚ´æÖеĶÑÕ»£¨ÒÔºó¼ò³ÆÕ»£©£¬¶øÒýÓÃÀàÐ͵ıäÁ¿ÔÚÕ»Öнö½öÊÇ´æ´¢ÒýÓÃÀàÐͱäÁ¿µÄµØÖ·£¬¶øÆä±¾ÉíÔò´æ´¢ÔÚ¶ÑÖС£==²Ù×÷±È½ÏµÄÊÇÁ½¸ö±äÁ¿µÄÖµÊÇ·ñÏàµÈ£¬¶ÔÓÚÒýÓÃÐͱäÁ¿±íʾµÄÊÇÁ½¸ö±äÁ¿ÔÚ¶ÑÖд洢µÄµØÖ·ÊÇ·ñÏàͬ£¬¼´Õ»ÖеÄÄÚÈÝÊÇ·ñÏàͬ¡£equals²Ù×÷±íʾµÄÁ½¸ö±äÁ¿ÊÇ·ñÊǶÔͬһ¸ö¶ÔÏóµÄÒýÓ㬼´¶ÑÖеÄÄÚÈÝÊÇ·ñÏà ......
ÏßÐÔ±í£¬Á´±í£¬¹þÏ£±íÊdz£ÓõÄÊý¾Ý½á¹¹£¬ÔÚ½øÐÐJava¿ª·¢Ê±£¬JDKÒѾΪÎÒÃÇÌṩÁËһϵÁÐÏàÓ¦µÄÀàÀ´ÊµÏÖ»ù±¾µÄÊý¾Ý½á¹¹¡£ÕâЩÀà¾ùÔÚjava.util°üÖС£±¾ÎÄÊÔͼͨ¹ý¼òµ¥µÄÃèÊö£¬Ïò¶ÁÕß²ûÊö¸÷¸öÀàµÄ×÷ÓÃÒÔ¼°ÈçºÎÕýȷʹÓÃÕâЩÀà¡£
Collection
©ÀList
©¦©ÀLinkedList
©¦©ÀArrayList
©¦©¸Vector
©¦¡¡©¸Stack
©¸Set
Map
©ÀHa ......
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class GB2UTF
{
public static String GBK2Unicode(String str)
{
StringBuffer result = new StringBuffer();
for (int i = 0; i < str.length(); i++)
&n ......