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

Java ³ÌÐòÄÚ´æ·ÖÎö

   java³ÌÐòÄÚ´æÖ÷Òª·ÖΪÁË2¸ö²¿·Ö£¬°üÀ¨ stack segment(Õ»ÄÚ´æ)¡¢heap segment(¶ÑÄÚ´æ)¡£ 
    ÔÚ·ÖÎöJava³ÌÐòÄÚ´æ·ÖÅäÇé¿öʱ£¬ÎÒÃÇ´ÓÏÂÃæÕâ¸ö¾­³£±»Ê¹ÓõÄÀý×Ó¿ªÊ¼°É¡£ 
    ÏÂÃæ³ÌÐò½«´òӡʲôÄØ£¿ 
   
Java´úÂë 
String s1 = new String("abc");  
        String s2 = new String("abc");  
        System.out.print(s1.equals(s2)); // 1  
        System.out.print(s1 == s2); // 2  
      
    ¿ÉÄÜ´ó¼ÒÐÄÖÐÒѾ­Óдð°¸ÁË£¬µÚ1ÌõÓï¾ä´òÓ¡µÄÊÇtrue£¬µÚ¶þÌõÓï¾ä´òÓ¡µÄfalse£¬Ã»´í£¬ÕýÈç´ó¼ÒËùÏ룬´òÓ¡½á¹û¾ÍÊÇÕâÑù¡£ÄÇô£¬´ó¼ÒÊÇ·ñÖªµÀΪʲôµÚ2ÌõÓï¾ä´òÓ¡µÄÊÇfalseÄØ£¿ÈÃÎÒÃÇÀ´¿´¿´Õâ¸ö³ÌÐòÖеÄÊý¾ÝÔÚÄÚ´æÖзÖÅäµÄÇé¿ö°É¡£ 
    Ê×ÏÈ£¬ÎÒÃÇ·ÖÎöµÚÒ»ÌõÓï¾äString s1=new String("abc"); 
    ÆäʵÕâÌõÓï¾äÊÇÏÂÃæÁ½ÌõÓï¾äµÄËõд£¬ 
    String s1; //1 
    s1=new String(“abc”); //2 
    1. ÔÚÕ»ÄÚ´æÖж¨ÒåÒ»¸öÃûΪs1µÄ¶ÔStringÀàµÄ¶ÔÏñÒýÓñäÁ¿ 
    2. ÔÚ¶ÑÄڴ濪±ÙÁËÒ»¿é¿Õ¼äÓÃÓÚ´æ·Å×Ö·û´®“abc”£¬½«1¶¨ÒåµÄÒýÓñäÁ¿s1Ö¸Ïò¸Ã¿Õ¼ä¡£ 
    ͬÀí£¬µÚ¶þÌõÓï¾äString s2=new String("abc");Ò²×öÁËͬÑùµÄÊÂÇ飬¶¨ÒåÒýÓñäÁ¿£¬Ö¸Ïòпª±Ù³öÀ´µÄ¿Õ¼ä¡£Ëµµ½ÕâÀï´ó¼Ò¿ÉÄÜÐÄÖÐÒѾ­Óдð°¸ÁË£¬ÎªÊ²Ã´s1!=s2ÄØ£¿ÒòΪËüÃÇÖ¸ÏòµÄÊÇÁ½¿é²»Í¬µÄ¶ÑÄÚ´æ¿Õ¼ä¡£ 
    Æäʵ£¬ÔÚjavaÖÐnew¹ý³Ì·ÖÅäÄÚ´æÇé¿ö¶¼ºÍÉÏÃæÀàËÆ£¬ÏÈÔÚÕ»ÄÚ´æÖж¨ÒåÒýÓã¬È»ºóÔÚ¶ÑÄÚ´æÖпª±Ù¿Õ¼ä£¬´æ·ÅÊý¾Ý£¬×îºóÈÃÒýÓÃÖ¸Ïò¸Ã¿Õ¼ä£¬Èç¹ûÒ»¸öÒýÓÃûÓÐÖ¸ÏòÈκοռ䣬ÄÇôÔÚʹÓÃÕâ¸öÒýÓñäÁ¿Ê±£¬³ÌÐò½«Å׳öÖøÃûµÄNullPointerException£¬Æäʵ´ÓÕâ¸öÒì³£Ãû×ÖÎÒÃÇÒ²ÄÜÇåÎúÖªµÀ²úÉú¸ÃÒì³£µÄÔ­Òò£¬²»ÊÇÂ𣿠
    ÊìϤÁËÉÏÃæÕâ¸öÀý×Ó£¬»ù±¾ÉÏ´ó¼Ò¶ÔJava³ÌÐòÄÚ´æ·ÖÅäÇé¿ö£¬ÒѾ­ÈëÃÅÁË£


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

java´ò°üjar ´øjre

 Ð´¸öMANIFEST.MF
Manifest-Version: 1.0
Created-By: shijishang
Main-Class: test2
×¢ÒâðºÅÖ®ºóÓпոñ£¬×îºóÒª¿ÕÁ½ÐÐ
ÓÃÃüÁîjar cvfm classes.jar META-INF/MANIFEST.MF classes
д¸öCMDÃüÁî
@echo off
java -jar -verbose:class classes.jar >> class.txt
pause
µ¼³öÐèÒª¾«¼òµÄ»ù±¾Àà
ÔÙÓÃÒÔÉÏ´ò ......

JAVAÀïµÄPINGºÍTELNET

 JAVAÀïµÄPINGÊÇÔÚJDK 1.5ºóÓÃÁËеĺ¯ÊýisreachableȥʵÏÖ,¾ßÌå½éÉÜÈçÏÂ:
InetAddress¶ÔÏóµÄ³£Ó÷½·¨
InetAddressÀàÓкܶàget·½·¨£¬ÓÃÀ´»ñÈ¡Ö÷»úÃû£¬Ö÷»úµØÖ·µÈÐÅÏ¢¡£Ö÷ÒªÓУº
byte[] getAddress() ·µ»Ø´ÎInetAddress¶ÔÏóµÄԭʼIPµØÖ·£¬±£´æΪһ¸öbyteÊý×é
String getCanonicalHostName() »ñÈ¡´ËIPµØÖ·µÄÍêÈ«ÏÞ¶ ......

phpºÍjava¹ØÓÚĿ¼Ê÷£¨ÁгöijһĿ¼ÏÂÎļþ½á¹¹£©

javaµÄд·¨
/**
*
* @param location
* @param nameList±£´æ½á¹ûµÄ£¡
*/
public void listDict(String location, List<String> nameList) {
File fileList = new File(location);
if (fileList.isDirectory()) {
File[] files = fileList.listFiles();
for (File f : files) {
i ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ