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

JavaÓïÑÔ»ù´¡(Ò»)

Ò»£¬JavaÓïÑÔÖеĶÔÏóÒýÓÃ
C++ÖÐÖ¸ÕëºÍÒýÓüæÓУ¬¶øJavaÖÐûÓÐÖ¸ÕëµÄ¸ÅÄÍêÈ«ÓÃÒýÓÃÌæ´ú¡£ÈçC++ÖÐÒ»Ñù£¬ÒýÓÃÊÇÎÒÃǸø±äÁ¿µÄÒ»¸ö“±ðÃû”£¬Ò»¸ö±äÁ¿¿ÉÒÔÓжà¸ö“±ðÃû”¡£ÒýÓõÄÖµÊÇÒ»¸öÄÚ´æµØÖ·£¬ÔÚ¶ÔÏóµÄÒýÓñ»¶¨Òåʱ£¬È磺
String s;  //´ËʱsֵΪ¿Õ£¬ÏµÍ³²¢Ã»ÓÐΪsËùÖ¸µÄ¶ÔÏó·ÖÅäÄÚ´æ
s = “hello”;  //¶ÔÏóʵÀý»¯ÒÔºó£¬ÏµÍ³Îª¶ÔÏóʵÀý·ÖÅäÄÚ´æ
t = s;   //¸ø¶ÔÏóʵÀý“hello”ÆðÁËÁíÒ»¸ö±ðÃût
t = “world”;  // s»áËætµÄ¸Ä±ä¶ø¸Ä±äÂð£¿
´ð°¸ÊÇ£ºÃ»ÓУ¬t±äÁË£¬¶øsûÓб䣬JavaÖÐËùÓеĻù±¾Êý¾ÝÀࣨString¡¢IntegerµÈ£©µÄʵÀýÒ»µ©´´½¨£¬²»Äܸı䡣
×¢Ò⣬ÎÒÃÇ˵µÄÊÇʵÀý²»Äܸı䣬¿ÉÄÜÓÐÈË»á˵£º
s = “hello world”; ÒÔºós²»ÊDZäÁËÂð£¿ÕâÊÇÒ»¸öÎóÇø£º
sµÄÖµ´Ó “hello”µÄ×Ö·û´®Ê×µØÖ·1±ä³ÉÁË“hello world”µÄ×Ö·û´®Ê×µØÖ·2£¬µ«ÊÇÄÚ´æµØÖ·1Öдæ·ÅµÄÊý¾ÝûÓиı䣬ÈÔÈ»ÊÇ “hello”£¬ÄÚ´æµØÖ·Öдæ·ÅµÄÊý¾Ý²ÅÊǶÔÏóµÄʵÀý¡£
¶þ£¬JavaÓïÑÔÖÐµÄ “==”ºÍ “equals()”
JavaÖÐµÄ “==”¿ÉÒÔ¶ÔËùÓÐÀàÐÍÊý¾Ý½øÐÐÆ¥Å䣬±ÈC++ÖÐµÄ “==”Òª·½±ã¡¢Ç¿´óÁËÐí¶à£¬ÔÚC++ÖÐÐèÒªÖØÔزſÉÒÔÍê³É¸÷ÖÖÀàÐ͵ÄÆ¥Åä¡£ÎÒÃÇ¿ÉÒÔ˼¿¼Ò»ÏÂΪʲôJavaÖÐµÄ “==”¿ÉÒÔÍê³ÉÕâÑùµÄͨÓù¦ÄÜ£¿
Ô­Òò¾ÍÔÚÓÚ£¬JavaÖÐʹÓÃÁ˶ÔÏóµÄÒýÓã¡
1£®    “==”±È½ÏµÄÊǶÔÏóÒýÓõÄÖµ£¬È磺
String a = “this is a string”;
String b = new(“this is a string”);//»òÕß String b= new (a);
ËäÈ» a¡¢bÒýÓÃÖ¸ÏòµÄ¶ÔÏóʵÀýÖµÏàͬ£¬µ«ÊÇ£¬ÓÉÓÚa¡¢bÒýÓõÄÖµ²»µÈ£¬ËùÒÔ “==”½«·µ»Øfalse¡£
2£®    Java.lang.ObjectÖеēequals()”±»ÆäËüÀา¸Çʱ£¬±ÈÈçjava.lang.StringÖÐµÄ “equals()”£¬²»½ö±È½Ï¶ÔÏóµÄÒýÓÃÖµ£¨¼´ “==”£©£¬¶øÇÒÔÚ “==”falseµÄÇé¿öÏ£¬¼ÌÐø±È½Ï¶ÔÏóʵÀýµÄÖµÊÇ·ñÏàµÈ¡£
public boolean equals(Object anObject) {
//µÚÒ»ÂֱȽϓ==”
       if (this == anObject) {
           return true;
       }
//Èç¹û“==&rdqu


Ïà¹ØÎĵµ£º

VC++,Javaµ½µ×¸ÃѧÄǸö£¿

ÏÖÔںܶàÈ˶¼ÎÊ C++ºÍJava ÄĸöºÃ. Æäʵ¼¼ÊõÉϸ÷Óи÷µÄºÃ´¦Óë²»×ã,ÎÒÏë´ó¼ÒËù˵µÄºÃ²»ºÃÖ¸µÃÊÇǰ;ºÃ²»ºÃ,׬µÄ¶à²»¶à.
 ÒªËµ×¬Ç®×î¶àµÄ¿Ï¶¨ÊÇC++ÁË.ÒòΪһÃż¼ÊõÊÇ·ñֵǮȫ¿´»áËüµÄÈËÓжàÉÙ¶ø²»ÔÚÓÚÕâ¸ö¼¼Êõ±¾ÉíµÄºÃ»µ. C++Éæ¼°Ó²¼þµ×²ãµÄ¶«Î÷±È½Ï¶à,ѧÆðÀ´ºÜ¸´ÔÓ,»áµÄÈËÉÙ,ËùÒÔֵǮ. 
&nb ......

javaÈÕÆڵĴ¦Àí

   
 
                                   ÏÂÃæÊdz£Óô¦ÀíÈÕÆڵķ½·¨£¬Ï£Íû¶Ô´ó¼ÒÓÐÓã¡
   ÔÚÎÒ ......

¹ØÓÚJava¶ÁÈ¡xmlÎļþµÄѧϰ

Ò».javaÀà
package com.java.test;   
 
import org.w3c.dom.*;   
import javax.xml.parsers.*;   
import java.io.*;   
 
public class JavaReadXml {   
// Document¿ÉÒÔ¿´×÷ÊÇXMLÔÚÄÚ´æÖеÄÒ»¸ ......

javaÖеõ½µ±Ç°Â·¾¶µÄ·½·¨


¹éÄÉһЩÍøÉÏÈ¡JAVA·¾¶µÄ·½·¨£º
×¢Ã÷£ºÈç¹û´ÓANTÆô¶¯³ÌÐò£¬this.getClass().getResource("")È¡³öÀ´µÄ±È½Ï¹Ö£¬Ö±½ÓÓÃJAVAÃüÁîÐе÷ÊԾͿɳɹ¦¡£
µÃµ½classpathºÍµ±Ç°ÀàµÄ¾ø¶Ô·¾¶µÄһЩ·½·¨
»ñµÃCLASSPATHÖ®Íâ·¾¶µÄ·½·¨£º
URL base = this.getClass£¨£©.getResource£¨""£©£» //ÏÈ»ñµÃ±¾ÀàµÄËùÔÚλÖã¬Èç/home/popeye/ ......

think in javaµÚÊ®ÎåÕ¹ØÓÚÍøÂç±à³ÌµÄ¶ÁÊé±Ê¼Ç

      ¶ÔÓÚjavaµÄÍøÂç±à³ÌÊéÖÐÌÖÂÛµÄÈ«²¿¹éÄÉÆðÀ´ÓÐSocketµÄʹÓã¬DatagramSocketµÄʹÓã¬javaÓëCGIµÄÅäºÏʹÓã¬javaÁ¬½ÓÊý¾Ý¿âÒÔ¼°javaÖе÷ÓÃÔ¶³Ì·½·¨¡£
     
Ê×ÏÈÊÇSocketµÄʹÓ㬶ÔÓÚ·þÎñ¶ËÀ´Ëµ£¬Ó¦¸ÃÉùÃ÷µÄÊÇServerSocket¶ÔÏó£¬È»ºóʹÓÃSocket
accept()·½·¨½øÐÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ