JAVAÖÐÎÄÏÔʾÂÒÂëÎÊÌâ
ÔÚ»ùÓÚJAVAµÄ±à³ÌÖУ¬¾³£»áÅöµ½ºº×ÖÏÔʾÂÒÂëµÄÎÊÌ⣬¾Ò»·¬²éѯÏÖ×ܽáÈçÏ¡£
ÔÚJSPÖн¨ÒéÍøÒ³±àÂ뷽ʽÓÃGBK,ÕâÑù»á·½±ãһЩ¡£
Õâ¸öÎÊÌâÊÇÒòΪJAVA±àÂ뷽ʽת»»³öÏÖÁËÎÊÌ⣬JavaÖÐĬÈϵıàÂ뷽ʽÊÇUNICODE£¬¶øÖйúÈËͨ³£Ê¹ÓõÄÎļþºÍDB¶¼ÊÇ»ùÓÚGB2312»òÕßBIG5µÈ±àÂ룬¹Ê»á³öÏÖ´ËÎÊÌâ¡£ÎÒÖªµÀÒ»¶¨ÓкܶàÅóÓÑÒ²»áÅöµ½Õâ¸öÎÊÌ⣬ËùÒÔÌؾÍ×ܽáÁËһϣ¬À´ÄóöÀ´Èôó¼ÒÒ»Æð·ÖÏíÁË¡£×Ô¼ºÒ²×ö¸ö±¸Íü¡£
1¡¢ÔÚÍøÒ³ÖÐÊä³öÖÐÎÄ¡£
JAVAÔÚÍøÂç´«ÊäÖÐʹÓõıàÂëÊÇ"ISO-8859-1"£¬¹ÊÔÚÊä³öʱÐèÒª½øÐÐת»¯£¬È磺
String str="ÖÐÎÄ";
str=new String(str.getBytes("GB2312"),"GBK");
µ«Èç¹ûÔÚ±àÒë³ÌÐòʱ£¬Ê¹ÓõıàÂëÊÇ“GB2312”,ÇÒÔÚÖÐÎÄƽ̨ÉÏÔËÐд˳ÌÐò£¬²»»á³öÏÖ´ËÎÊÌ⣬һ¶¨Òª×¢Òâ¡£
2¡¢´Ó²ÎÊýÖжÁÈ¡ÖÐÎÄ
ÕâÕýºÃÓëÔÚÍøÒ³ÖÐÊä³öÏà·´È磺
str=new String(str.getBytes("8859_1"),"GBK");
3¡¢²Ù×÷DBÖеÄÖÐÎÄÎÊÌâ
Ò»¸ö½Ï¼òµ¥µÄ·½·¨ÊÇ£ºÔÚ“¿ØÖÆÃæ°â”ÖУ¬°Ñ“ÇøÓò”ÉèÖÃΪ“Ó¢Óï(ÃÀ¹ú)”¡£Èç¹û»¹»á³öÏÖÂÒÂ룬»¹¿É½øÐÐÈçÏÂÉèÖ㺠£¨ÍøÉÏ¿´µÄ£¬×Ô¼ºÃ»×ö¹ýʵÑ飩
È¡ÖÐÎÄʱ£ºString XSDWMC=new String(prs.getString("XSDWMC").getBytes("GB2312"),"GBK"));
ÏòDBÖпÉÖ±½ÓдÈëGBK£¬ÕâÀïÉÙÒ»´Îת»»
4¡¢ÔÚJSPÖеÄÖÐÎĽâ¾ö£º
ÔÚ“¿ØÖÆÃæ°â”ÖУ¬°Ñ“ÇøÓò”ÉèÖÃΪ“Ó¢Óï(ÃÀ¹ú)”. £¨ÍøÉÏ¿´µÄ£¬×Ô¼ºÃ»×ö¹ýʵÑ飩
ÔÚJSPÒ³ÃæÖмÓÈ룺
Èç¹û»¹²»ÐÐÕý³£ÏÔʾ£¬Ôò»¹Òª½øÐÐÏÂÃæµÄת»»£º
È磺name=new String(name.getBytes("ISO-8859-1"),"GBK");
¾Í²»»á³öÏÖÖÐÎÄÂÒÂëÎÊÌâÁË¡£
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
ÔÚ½ñÄê11Ô·ݣ¬ºêÌìÈí¼þ¿ª·ÅÁ˹«Ë¾µÄ¿ªÔ´°æOA 1.2
beta°æ±¾£¬µÃµ½Í¬ÐÐÒÔ¼°ÆóÒµµÄÈÈÁÒÏìÓ¦£¬¹«Ë¾Ò²¼Ó½ôÁËÏÂÒ»²½µÄ¿ªÔ´µÄ²½·¥£¬ºêÌìÈí¼þ°ÑÏÖÐеÄÆóÒµ°æ1.2.1Ò²¶ÔËùÓÐÆóÒµ¿ª·ÅÔ´´úÂ루ÔÝʱ²»¶Ô¸öÈË¿ª
·Å£¬ËäȻĿǰÓкܶà¸öÈ˼°Èí¼þ¿ª·¢ÊÒÇ¿ÁÒÒªÇ󣩣¬ÆóÒµÖ»ÐèÒª»¨ÉÏÍòÔª×óÓÒ£¬¾Í¿ÉÒÔ¹ºÂò¸Ã°æ±¾µÄÈ«²¿´úÂ룬²¢»ñµÃÊÚȨ»ùÓÚ´ËÏ ......
JavaÐÂÊÖÁôÒ⣺Java±à³ÌÈýÊ®Ìõ¹æÔò
¡¡¡¡(1) ÀàÃûÊ××ÖĸӦ¸Ã´óд¡£×ֶΡ¢·½·¨ÒÔ¼°¶ÔÏ󣨾ä±ú£©µÄÊ××ÖĸӦСд¡£¶ÔÓÚËùÓбêʶ·û£¬ÆäÖаüº¬µÄËùÓе¥´Ê¶¼Ó¦½ô¿¿ÔÚÒ»Æ𣬶øÇÒ´óдÖм䵥´ÊµÄÊ××Öĸ¡£ÀýÈ磺
ThisIsAClassName
thisIsMethodOrFieldName
¡¡¡¡ÈôÔÚ¶¨ÒåÖгöÏÖÁ˳£Êý³õʼ»¯×Ö·û£¬Ôò´óдstati ......
½ñÌì¿´µ½Ò»µÀÌâÄ¿£¬ÊÇÕâÑùµÄ£º£¨ÎÒÔÚÀïÃæ´òÓ¡ÁËһЩÓï¾ä£¬ÏÈ×¢Ê͵ôÁË£©
class Singleton {
private static Singleton obj= new Singleton();
public static int counter1;
public static int counter2 = 2;
private Singleton() {
counter1++;
counter2++;
// System.out.println("Singleton counter1:" ......
ÈκÎÏîÄ¿¿ª·¢ÖУ¬ÔÚÒ»¸ö¼¯ºÏ»òÊý×éÖÐÑ»·²éÕÒ£¬ËÑË÷Ä¿±êÊý¾Ý£¬ÊǾ³£Óõ½µÄ¡£Èç¹ûËÑË÷µÄÊý¾Ý·¶Î§±È½ÏС£¬ÄÇô²»¹ÜʲôËã·¨£¬¶ÔÓÚ½ñÌìµÄ¼ÆËã»úÀ´Ëµ£¬ÐÔÄÜÉÏ»ù±¾²î±ð²»´ó£¬µ«ÊÇÈç¹ûÊý¾ÝÁ¿´ïµ½¼¸°ÙÍò£¬ÉõÖÁ¸ü´ó£¬ÄÇôËã·¨µÄÑ¡ÔñºÍÓÅ»¯¾ÍÏԵñȽÏÖØÒª¡£ÓпÕÖ®Óà²âÊÔÁËÏÂ˳ÐòËÑË÷ºÍ¶þ·ÖËÑË÷µÄÐÔÄÜ£¬¾¹È»·¢ÏÖЧÂʲîÒìÔÚ1500±¶×óÓÒ ......