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

ÓÃjava°ÑgoogleºÍbaiduµÄURL±àÂ뻹ԭ³ÉÃ÷ÎÄ×Ö´®

ÒòΪÔÚ×öÁ´½ÓÀ´Ô´Í³¼ÆµÄʱºòÐèÒª°Ñ http://www.baidu.com/baidu?word= ... B%F7&tn=myie2dg  ÕâÀàµÄURL±àÂ뻹ԭ³ÉÃ÷ÎÄ×Ö´®£¬Ò»°ã´ó²¿·ÖµÄÍøÕ¾¶¼ÊÇÓÃÆÕͨµÄURL±àÂëÐÎʽ£¬ÈçÉÏÃæÁ´½ÓÖеÄbadu£¬ÕâÖַdz£ÈÝÒ×ת»»ºÍ»¹Ô­£¬Java°üÀïÌṩÁËÁ½¸öÀàµÄ²»Í¬·½·¨URLEncode.encode()ºÍURLDecode.decode()Äܷdz£·½±ãʵÏÖ£¬µ«Ò²ÓÐÌرðÒ»µãµÄ¾ÍÊÇGoogleÁË£¬http://www.google.com/search?hl= ... 9C%E7%B4%A2&lr= ËûÃǵıàÂëºÍ±ðÈ˲»Ïàͬ£¬Èç¹ûʹÓÃURLDecode.decode()µÄ»°Ôò±ä³ÉÂÒÂ룬²éѯµÄһЩÏà¹Ø×ÊÁ϶¼ËµGoogleʹÓõÄÊÇUTF-8±àÂ룬ÕâµãÎÒ¾ÍÓÐЩÆæ¹ÖÁË£¬Èç¹ûGoogleʹÓõÄÊÇUTF-8±àÂ룬ÄDZðÈËʹÓõÄÓÖÊÇʲô£¿IEµÄ¸ß¼¶Ñ¡ÏîÀï²»ÊÇÓÐÏî“ʼÖÕÒÔUTF-8ÐÎʽ·¢ËÍURL”µÄÂ𣿲»¹ýUTF-8Ò»¸öÖÐÎÄÊÇ3byte£¬¶øÒ»°ãµÄ±àÂëÔòÊÇ2¸öbyte,Õâ¾ÍÊÇΪʲôһ°ãµÄURLÖÐÊÇÒÔÁ½×é’%’´úÂë±íʾһ¸öºº×Ö£¬Èç“ÖДµÄURL±àÂëΪ"%D6%D0"£¬¶øUTF-8ÔòΪ3×飬“ÖДΪ"%E4%B8%AD"£¬Õâ¸öÎÊÌâÎÒÔÚGoogleÀïҲûµÃµ½½ÏºÃ»Ø´ð¡£ÎÒ¶Ô¸÷ÖÖ±àÂëÐÎʽÁ˽âµÄ²»ÊǷdz£ºÃ£¬Ö®Ç°Ö»¿´¹ýÔõô½«×Ö·û´®×ª³ÉUtf8-URL±àÂëµÄ·½·¨£¬ÆäʵҲͦ¼òµ¥µÄ£¬Ö±½Óת³ÉbyteºóÖ±½ÓÈ¡Æä16½øÖÆֵǰÃæ¼Ó¸ö%¾ÍÐУ¬»¹Ô­·½·¨ÔÚÍøÉÏËÑÁ˼¸È¦¾ÓȻû·¢ÏÖÓÐÏֳɵģ¡µ¹ÊÇÒ²ÊǼ¸¸öÈËÔÚCSDNÎÊÁË´ËÀàµÄÎÊÌâ¡£×îºó»¹ÊǾö¶¨×Ô¼º¸ã¶¨ÁË£¬»ù±¾ÉÏÊÇtoUTF8µÄԭ·Í˻ط¨£¬ÔÙ¼ÓÁ˸ö¼ì²âURLÁ´½ÓÊÇ·ñUTF-8ÐÎʽµÄ·½·¨£¬¾õµÃÒÑÂùºÃÓÃÁË¡£ÄÜÄóöÀ´shareһϡ£
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.net.URLDecoder;
/**
*
Title:×Ö·û±àÂ빤¾ßÀà
*
Description:  
*
Copyright: flashman.com.cn Copyright (c) 2005
*
Company: flashman.com.cn
* @author: jeffzhu
* @version 1.0
*/
public class CharTools {
  /**
   * ת»»±àÂë ISO-8859-1µ½GB2312
   * @param text
   * @return
   */
  public String ISO2GB(String text) {
    String result = "";
    try {
      result = new String(text.getBytes("ISO-8859-1"), "GB2312");
    }
    catch (UnsupportedEncodingException ex) {
      result = ex.toString();
    }
&n


Ïà¹ØÎĵµ£º

Java SwingÖеÄJTreeÄ£ÐÍ

±¾ÎĽéÉÜJava SwingÖеÄJTreeÄ£ÐÍ£¬½éÉÜÈçºÎ´´½¨¡¢Ð޸ġ¢±éÀú£¬ÉèÖÃÊ÷¡£²Î¿¼Core Java2Ïà¹ØÕ½ڼ°ÆäÔ´´úÂë¡£
SwingÊ÷ʹÓÃÈËÃÇËùÊìϤµÄÎļþ¼ÐºÍÊ÷ҶͼÀ´ÏÔʾ·Ö²ãµÄÊý¾Ý¡£Ê÷Óɽڵã×é³É£¬½Úµã¿ÉÒÔÊÇÎļþ¼Ð£¬Ò²¿ÉÒÔÊÇÊ÷Ò¶¡£Îļþ¼Ð¿ÉÒÔÓÐ×ӽڵ㣬³ý¸ù½ÚµãÖ®ÍâµÄËùÓнڵ㶼ֻÓÐÒ»¸ö¸¸½Úµã¡£¿ÕµÄÎļþ¼ÐÓëÊ÷Ò¶µÄ²»Í¬Ö®´¦¾ÍÔÚÓÚËüÔÊ ......

java¿ª·¢¿ò¼Ü_ZKʹÓñʼǶþ

ÔÚÉÏÒ»¸öÎÄÕÂÀï,ÎÒÃÇ°ÑÏîÄ¿½¨ºÃÁË,²¢ÇÒÒѾ­³É¹¦ÔËÐÐ,ÏÖÔÚÀ´Àí½âÏÂzkʼþÇý¶¯(event-driven)µÄ£¬»ùÓÚ×é¼þ(component-based)µÄÌصã
ÏÈÀ´µãÀíÂÛ,ʲô½Ð×ö»ùÓÚ×é¼þ,ά»ù°Ù¿ÆÀïÃæÕâôÃèÊöµÄ:»ùÓÚ×é¼þµÄÈí¼þ¹¤³Ì£¨Component-based software engineering£¬¼ò³ÆCBSE£©»ò»ùÓÚ×é¼þµÄ¿ª·¢£¨Component-Based Development£¬¼ò³ÆCBD£©ÊÇÒ ......

JavaÖÐÈÃCPU±£³ÖÔÚÒ»ÌõÖ±ÏßÉÏ


 /**
  * @param args
  */
 public static void main(String[] args) {
  long time1 = System.currentTimeMillis();
  long time2 = System.currentTimeMillis();
  while (true) {
   while ((time1 - time2) < 30)
   & ......

Çë´ó¼ÒÖ¸½Ì£¬ÓйØJavaÖÐmain·½·¨¼°²ÎÊýÎÊÌâ

½ñÌìûʸɡ££¬ÄÃJavaÖеÄmainº¯ÊýÀ´Ịֽ̀¬¡£¡£»¹ÇëÖîλָµã°¡£¬£¬
public static void main(String args [])
{
 .....
}
ÕâÊÇ´ó¼ÒÒ»°ãµÄд·¨°É£¬ÕâÀïÎÒÏëÌ̵ֽÄÖ÷ÒªÓÐÒÔϼ¸µã£º
1.ËüµÄ²ÎÊýÎÊÌ⣬ÄǸö²ÎÊýµ¹µ×ÓкÎÓÃÄØ£¬£¬ÕâÊǺÜÁîÈËÃÔ»óµÄ£¬ÕâÀï×Ô¼ºÐ´Á˸öÀý×ÓÊÔÁËһϣ¬µ«ÊdzöÏÖÁËÒì³££º
 class A
{ ......

java»ù´¡×ܽá

¼Ì³Ð(inheritance)
    ¼Ì³ÐÊÇʹÓÃÒÑ´æÔÚµÄÀàµÄ¶¨Òå×÷Ϊ»ù´¡½¨Á¢ÐÂÀàµÄ¼¼Êõ£¬ÐÂÀàµÄ¶¨Òå¿ÉÒÔÔö¼ÓеÄÊý¾Ý»òÐµĹ¦ÄÜ£¬Ò²¿ÉÒÔÓø¸ÀàµÄ¹¦ÄÜ£¬µ«²»ÄÜÑ¡ÔñÐԵؼ̳и¸Àà¡£ÕâÖÖ¼¼ÊõʹµÃ¸´ÓÃÒÔÇ°µÄ´úÂë·Ç³£ÈÝÒ×£¬Äܹ»´ó´óËõ¶Ì¿ª·¢ÖÜÆÚ£¬½µµÍ¿ª·¢·ÑÓᣱÈÈç¿ÉÒÔÏȶ¨ÒåÒ»¸öÀà½Ð³µ£¬³µÓÐÒÔÏÂÊôÐÔ£º³µÌå´óС£¬ÑÕÉ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ