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

¶ÔÓÚJAVAÖÐStringµÄÒ»¸ö×ܽá

½ñÌì¸úͬѧÌÖÂÛÒ»¸öÎÊÌ⣬¹ØÓÚStringµÄÄÚ´æ´æ·ÅÎÊÌ⣬ÎÊÌâÈçÏÂ
String s = "abc";
String t = new String("abc");
ÆäÖУ¬s t ¶¼ÊÇ´æ·ÅÔÚ¶ÑÕ»ÀïµÄ×÷Ϊ¶ÔÏóÒýÓã¬ÎÒµÄÎÊÌâÊÇ£¬ºóÃæµÄ¶ÔÏóÐÅÏ¢£¬´æÔÚÄÄÀÈç¹û²ÉÓÃnewÀ´³õʼ»¯t£¬ÄÇô"abc"¿Ï¶¨ÊÇ´æ·ÅÔÚ¶ÑÀïÃæµÄ£¬ÇëÎÊsËù¶ÔÓ¦µÄ"abc"ÊÇ´æ·ÅÔÚ¶ÑÕ»Öл¹ÊǶÑÖС£¡£¡£
ÇëÅ£È˸ø¸öÖ¸µã
-----------------------------------------------------------------------------------
StringÎÊÌâ½â¾öÖ®µÀ£º
Ê×ÏȶÔÓÚÕâ¸öÊ××Öĸ´óдµÄÀàÐÍ£¬ºÜ¶àÈ˵ÚÒ»¸Ð¾õÊÇËüÓ¦¸ÃÊǸö¸´ÔÓÀàÐÍ£¬µ«ÊÇÊÂʵÉÏÊÇÕâÑùÂð£¿ÏÂÃæ½«´Ó¼¸¸ö·½ÃæÀ´·ÖÎö¡£
Ê×ÏÈÊÇStringµÄ´´½¨
String s = "abc";
Õâ¸ö±í´ïʽÊDZȽϾ­µäµÄStringÀàÐÍʵÀýµÄÉùÃ÷·½Ê½£¬ÆäÖÐsÊÇÖ¸Ïò"abc"µÄÒýÓã¬"abc"ÊÇÆä¶ÔÏóÄÚÈÝ£¬ÎÒÃÇÔÚÕâÀï¹ÃÇÒ½ÐËüΪ¶ÔÏó£¨ÔÚJAVAÖлù±¾ÀàÐͲ»ÊôÓÚ¶ÔÏ󣬵«ÊÇÓÐÏàÓ¦µÄ°ü×°ÀàÀ´ÊµÏÖËüÃǵĶÔÏó¹¦ÄÜ£©£¬sºÍ"abc"¶¼ÊÇ´æ·ÅÓÚ¶ÑÕ»ÖС£
ÕâÀïÐèҪǿµ÷Ò»µã£¬ÔÚJAVAµÄÄÚ´æ·ÖÅä»úÖÆÖУ¬¹²ÓÐÁ½ÖÐ´æ´¢ÇøÓò£º¶ÑÕ»ºÍ¶Ñ¡£ÆäÖжÑÕ»´æ·Å³ÌÐò¹ý³Ì£¬ÒÔ¼°¶ÔÏóÒýÓÃÒÔ¼°»ù±¾ÀàÐÍ£¬ÒÔ¼°Õâ¸ö¹Å¹ÖµÄ¶ÔÏóString¡£
ÔÚ¶ÑÕ»ÖУ¬JAVAΪÁËÄܹ»ÈóÌÐòÔ±ÇáËɵIJÙ×÷×Ö·û´®£¬ÉèÁ¢ÁËÒ»¸ö×Ö·û´®ÈÝÆ÷--»º³å³Ø¡£ÈçÉÏÀýÖУ¬µ±ÎÒÃÇÉùÃ÷s±äÁ¿µÄʱºò£¬¹²·ÖΪÒÔϼ¸²½£¬Ê×ÏÈÊÇÓÉJVMµ½»º³å³ØÖвéÕÒ"abc"£¬»º³å³ØÊÇÔÚÿ¸öÏ̳߳õʼ»¯µÄʱºò³õʼµÄ¡£Èç¹ûÕÒµ½ÁË£¬ÄÇô½«ÒÑ´æÔÚµÄ"abc"½»¸øs£¬Èç¹ûûÓÐÕÒµ½£¬ÄÇô½«"abc"´æ·ÅÈ뻺³å³ØÖУ¬²¢½«ËüµÄµØÖ·¸¶¸øs£¬ÕâÑù¾ÍÍê³ÉÁËÕû¸ö¸¶Öµ²Ù×÷¡£
ÕâÊÇ×î¼òµ¥µÄÒ»¸öÀý×Ó£¬ÔÚÕâÀïÃæ£¬ÎÒÃÇ¿ÉÄÜ»áÓÐÒ»¸öÎÊÌ⣺
String s = "abc";
String t = "abc";
System.out.println(s==t);
Êä³ö½á¹ûÊÇʲô£¿½á¹ûÊÇtrue£¬ÕâÊǸù¾ÝÉÏÃæµÄÌÖÂÛ£¬ÎÒÃÇ¿ÉÒÔ½ÏΪÇáËɵĵõ½Õâ¸ö´ð°¸£¬ÄÇôÇë¿´ÏÂÃæÕâ¸öÀý×Ó¡£
String s = new String("abc");
String t = new String("abc");
System.out.println(s==t);
Êä³ö½á¹ûΪfalse;¿ÉÒÔ¿´³ö£¬Õâ¾ÍÊÇStringµÄ¶ñÐÄÖ®´¦£¬ËüÕŵļÈÏñ°ü×°Æ÷£¬ÓÖÏñ»ù±¾ÀàÐÍ¡£¡£¡£ºÃ°É£¬ÎÒÃÇÔÝÇÒ²»È¥ÌÖÂÛËüµÄ¹éÊôÎÊÌ⣬±Ï¾¹SUNµÄ´óţΪÁ˹ã´ó³ÌÐòÔ±×ÅÏë¶øÉè¼ÆµÄ¡£ÔÚÉÏÀýÖУ¬ÎÒÃÇ¿ÉÒÔ¿´µ½£¬s,t¶¼ÊÇͨ¹ýnewµÄ·½Ê½´´½¨µÄ£¬ÔÚÕâÀs,tÊÇ´æ·ÅÓÚ¶ÑÕ»ÖУ¬ËûÃÇÊÇÖ¸Ïò¶ÔÏóµÄÒýÓ㬶øÁ½¸ö¶ÔÏóÄØ£¬ËûÃǶ¼ÊÇ´æ·ÅÓÚ¶ÑÖУ¬×÷Ϊnew³öÀ´µÄÕýͳ¶ÔÏó£¬ËûÃÇÖ»ÄÜ´ôÔÚ¶ÑÖС£
ËäÈ»¶¼ÊÇString£¬ËäÈ»ËûÃǵÄÄÚÈÝÍêÈ«Ïàͬ£¬µ«ÊÇÓÉÓÚ³õʼ»¯·½Ê½²»Í¬£¬ËûÃÇÒ²Ïà²îÉõÔ¶¡£
¼òµ¥µÄÎÊÌâ˵Íê


Ïà¹ØÎĵµ£º

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ÃæÊÔÌ⣡¾ä×Ó°´ÕÕµ¥´Ê·´Öã¡

Óöµ½Ò»¸öjava±à³ÌÃæÊÔÌ⣬µ±Ê±Ã»ÓÐд³öÀ´£¬»ØÀ´×ÐϸÏëÁËÏ룬д³ö´ð°¸£¬Ò»¹²ÒÔºó²Î¿¼£¡
ÒªÇ󣺽«×Ö·û´®"I am a good student."ת»»³É"student. good a am I"
java´úÂëΪ£º
public class Application
{
 private String s;
 public void setS(String s)
 {
  s=s;
 }
 public S ......

JAVA xml LSParserFilterµÄÓ¦ÓÃ

LSParserFilter---ÔØÈëÓë±£´æ
Ó¦ÓÃorg.w3c.dom ʵÏÖXMLµÄÔØÈëÓë±£´æÊµÀý
/**
* ʵÏÖDOM3µÄLS(Load & Save)¹¦ÄÜ
*
* @author S.Well
* @see org.w3c.dom.DOMErrorHandler
* @see org.w3c.dom.ls.LSParserFilter
*/
public class XML_LS implements DOMErrorHandler, LSParserFilter {
private static ......

JAVA¶ÁXML£ºsax,dom,jdom,dom4jµÄ±È½ÏÒÔ¼°Ñ¡Ôñ(ת)

JAVA¶ÁXML£ºsax,dom,jdom,dom4jµÄ±È½ÏÒÔ¼°Ñ¡Ôñ(ת)
Ô­ÎÄ£ºwww.hicourt.gov.cn/homepage/show9_content.asp
SAX£º                                 ......

Java IO °üÖеÄDecoratorģʽ

JDKΪ³ÌÐòÔ±ÌṩÁË´óÁ¿µÄÀà¿â£¬¶øÎªÁ˱£³ÖÀà¿âµÄ¿ÉÖØÓÃÐÔ£¬¿ÉÀ©Õ¹ÐÔºÍÁé»îÐÔ£¬ÆäÖÐʹÓõ½ÁË´óÁ¿µÄÉè¼ÆÄ£Ê½£¬±¾ÎĽ«½éÉÜJDKµÄI/O°üÖÐʹÓõ½µÄDecoratorģʽ£¬²¢ÔËÓôËģʽ£¬ÊµÏÖÒ»¸öеÄÊä³öÁ÷Àà¡£
¡¡¡¡Decoratorģʽ¼ò½é
¡¡¡¡DecoratorģʽÓÖÃû°ü×°Æ÷(Wrapper)£¬ËüµÄÖ÷ÒªÓÃ;ÔÚÓÚ¸øÒ»¸ö¶ÔÏó¶¯Ì¬µÄÌí¼ÓһЩ¶îÍâµÄÖ°Ôð¡£Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ