¹ØÓÚjavaÖÐurl±àÂëµÄÎÊÌâ
½ñÌìÓöµ½ÕâÑùµÄÎÊÌâ¡£ÐèÒªÏÂÔØÒ»¸öÎļþ£¬¸ÃÎļþµÄurlÈçÏ£º hxxp://www.abc.com/view/img/%E7%BD%91%E4%B8%8A%E8%B4%AD%E7%89%A9.rar
´ËÁ´½ÓÔÚä¯ÀÀÆ÷Ï»áÖØ¶¨Ïòµ½±ðµÄÍøÕ¾¡£ËùÒÔÏÂÔØÏÂÀ´µÄÎļþ²¢·ÇÎÒÏëÒªµÄ¡£²éÁËÏÂÔÀ´ÊÇurl±àÂëºóµÄÎļþÃû¡£ÄÇôҪÏëÏÂÔØ¾Í±ØÐë¶ÔÕâ¸ö±àÂë½øÐнâÂë¡£¡£¡£¡£¡£
³ÌÐòºÜ¼òµ¥£¬java×Ô´ø±à½âÂëµÄ·½·¨£º
public class TestUrlCode {
public static void main(String[] args){
String keyWord = "hxxp://www.abc.com/view/img/%E9%BB%91%E7%99%BD%E6%97%A0%E5%B8%B8.rar
“;
try {
keyWord = URLDecoder.decode(keyWord, "UTF-8");
System.out.println(keyWord);
String urlStr = URLEncoder.encode("ºÚ°×ÎÞ³£", "UTF-8");
System.out.println(urlStr);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
½á¹û £º hxxp://www.abc.com/view/img/ºÚ°×ÎÞ³£.rar
%E9%BB%91%E7%99%BD%E6%97%A0%E5%B8%B8
¶Ô±ÈÀ´¿´ÒѾÕýÈ·µÄ½«±àÂëת»»¹ýÀ´ÁË£££
Ïà¹ØÎĵµ£º
1.´´½¨²âÊÔ±í
create table users(
userid int primary key,
username varchar2(20),
userpwd varchar2(20)
);
insert into users values(1,'test','test');
insert into users values(2,'test','test');
insert into users values(3,'test','test');
insert into users values(4,'test','test');
insert i ......
package com.down.servlet;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import java ......
µÝ¹éËã·¨Éè¼ÆµÄ»ù±¾Ë¼ÏëÊÇ£º¶ÔÓÚÒ»¸ö¸´ÔÓµÄÎÊÌ⣬°ÑÔÎÊÌâ·Ö½âΪÈô¸É¸öÏà¶Ô¼òµ¥ÀàͬµÄ×ÓÎÊÌ⣬¼ÌÐøÏÂÈ¥Ö±µ½×ÓÎÊÌâ¼òµ¥µ½Äܹ»Ö±½ÓÇó½â£¬Ò²¾ÍÊÇ˵µ½Á˵ÝÍÆµÄ³ö¿Ú£¬ÕâÑùÔÎÊÌâ¾ÍÓеÝÍÆµÃ½â¡£
¹Ø¼üҪץסµÄÊÇ£º
£¨1£©µÝ¹é³ö¿Ú
£¨2£©µØÍÆÖð²½Ïò³ö¿Ú±Æ½ü
Àý×Ó:
example£º Çó5µÄ½×³Ë¡£¡£ & ......
OOPµÄÌØÐÔÖ÷ÒªÓУº1¡¢·â×°£»2¡¢¼Ì³Ð£»3¡¢¶à̬¡£ÏÂÃæ´ÓÕ⼸¸ö·½Ãæ¾ßÌå²ûÊö¡£
1¡¢·â×°
·â×°Äܽ«ÀàµÄ¾ßÌåÐÅÏ¢Òþ²ØÆðÀ´£¬Ê¹µÃÊý¾ÝµÃµ½±£»¤¡£Æä¾ßÌåʵʩÖ÷ÒªÊÇÒÀ¿¿·ÃÎÊ¿ØÖÆ»úÖÆÈ¨ÏÞ£¬ÆäȨÏÞÖ÷ÒªÓÐËÄÖÖ£º1¡¢private£»2¡¢default£¨C++ûÓÐÕâÖÖȨÏÞ£©£»3¡¢protected£»4¡¢public¡£ÔÚÕâËÄÖÖȨÏÞϵÄÊý¾ÝÔÚÍâ½çµÄ¿É¼ûÐÔ²»Í¬¡£Private ......
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø£¬ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)
µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸Á
Á¢£¬µ«ÊÇËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµØÊÍ·Å¡£Ò»°ãÀ´Ëµ£¬¶ÑµÄÊÇÓÉÀ¬»ø»ØÊÕ
À´¸ºÔðµÄ£¬¾¡¹ÜJVM¹æ·¶²¢²»ÒªÇóÌØÊâµÄÀ¬»ø»ØÊÕ¼¼Êõ£ ......