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

JAVA¹æ·¶Ñ§Ï°——String×ÖÃæ³£Á¿

package testPackage;
class Test {
public static void main(String[] args) {
String hello = "Hello", lo = "lo";
System.out.print((hello == "Hello") + " ");
System.out.print((Other.hello == hello) + " ");
System.out.print((other.Other.hello == hello) + " ");
System.out.print((hello == ("Hel"+"lo")) + " "); //(1)
System.out.print((hello == ("Hel"+lo)) + " "); //(2)
System.out.println(hello == ("Hel"+lo).intern());
}
}
class Other { static String hello = "Hello"; }
package other;
public class Other { static String hello = "Hello"; }
ÔËÐнá¹ûÈçÏ£º
true true true true false true 
½á¹û½âÊÍ£º
1. ËùÓÐString×ÖÃæÁ¿£¬²»¹ÜÆäËùÔÚµÄclassºÍpackage£¬¶¼ÊÇͬһ¸öString¶ÔÏóµÄÒýÓÃ
2. ¶ÔÓÚ³£Á¿±í´ïʽ¼ÆËãµÄString£¬¶¼ÊÇÔÚ±àÒëÆÚ¼ä¼ÆËãµÄ£¬±»µ±×÷String×ÖÃæÁ¿¿´´ý¡£ÀýÈç(1)ÐÐËùÔڵĴúÂë
3. ¶ÔÓÚÔÚÔËÐÐÆÚÁ¬½ÓµÄString£¬¶¼ÊÇд´½¨µÄ£¬Òò´Ë²»Ïàͬ¡£ÀýÈç(2)ÐÐËùÔڵĴúÂë


Ïà¹ØÎĵµ£º

javaÊý¾ÝÀàÐÍ´«µÝ̽Ë÷

ѧϰjavaÒ²ÓÐһЩʱ¼äÁË£¬µ«ÊǶÔjavaÀïµÄÊý¾ÝÀàÐÍ´«µÝ·½·¨»¹ÊDz»ÉõÁ˽â
ÒÔÏÂÊÇÎÒÔÚjre1.6.0_04 ÔËÐл·¾³ É϶Ôjava Êý¾ÝÄÚÐÍ´«µÝ·½Ê½µÄ̽Ë÷
¸Ð¾õÊÕ»ñ»¹ÊDZ˶࣬ÒòΪ³öÏÖÁËÎÒÓöÁÏÖ®ÍâµÄ½á¹û¡£
Ò»¡¢»ù±¾Êý¾ÝÀàÐÍ£º
   »ù±¾ÀàÐÍΪֵ´«µÝ£¬»ù±¾ÀàÐÍÖеÄÊý×éΪÒýÓô«µÝ£»
̽Ë÷´úÂëÈçÏ£º
package cn.cn;
public ......

Java equals

boolean java.lang.Object.equals(Object obj)
Indicates whether some other
object is "equal to" this one.
The equals method implements an
equivalence relation on non-null object references:
It is reflexive: for
any non-null reference value x, x.equals(x) should return true.
It ......

javaµÄ»ù±¾Ë¼Ïë

³     Java ÓïÑÔÖУ¬¶Ô¸÷ÖÖ±äÁ¿¡¢·½·¨ºÍÀàµÈÒªËØÃüÃûʱʹÓõÄ×Ö·ûÐòÁгÆÎª±êʶ·û¡£
      --·²ÊÇ×Ô¼º¿ÉÒÔÆðÃû×ֵĵط½¶¼½Ð±êʾ·û£¬¶¼×ñÊØ±êʾ·ûµÄ¹æÔò¡£
³     Java ±êʶ·ûÓÐÈçÏÂÃüÃû¹æÔò£º
–     ±êʶ·ûÓÉ×Öĸ¡ ......

ÓÃjava³ÌÐòÖÆ×÷exeÎļþ

Ò» JSmooth
1.³öÆ·
Jsmooth,Sourceforge.net
2. ÀàÐÍ
free
3. ÏÂÔØ
http://jsmooth.sourceforge.net/download.php
4. ²½Öè
a)ÀûÓÃEclipse½«ËùÐèÒªµÄÖ÷Àà´ò³É¿É¶ÀÁ¢ÔËÐеÄjar°ü£¬×¢ÒâÌí¼ÓmanifestÊôÐÔºÍMainClass¡£
b)н¨Ò»¸öJsmooth¹¤³Ì
c) ÔÚsketlonÖÐÑ¡Ôñ“Console“ »òÕß “Windowe ......

Java »·¾³±äÁ¿µÄÅäÖÃ

ÔÚjava»·¾³±äÁ¿ÅäÖÃÉÏץס “Á½Ìí¼Ó£¬ÒÔÐ޸ľÍOKÁË”
°´×¡windows¼ü+PauseBreak¼üÖ±½ÓÔڸ߼¶ÖеĻ·¾³±äÁ¿´¦ÉèÖÃ
1.Ìí¼Ó
CLASSPATH
.;C:\Program Files\Java\jdk1.6.0_02\lib;£¨ÕâÊÇÄãJdk°²×°µÄĿ¼Ïµİü£©
 
2.Ìí¼Ó
JAVA_HOME
C:\Program Files\Java\jdk1.6.0_02
3.ÐÞ¸Ä
ÐÞ¸Äpath±äÁ¿
C:\Progra ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ