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

°Ë javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(¹¹Ôì·½·¨)

°Ë javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(¹¹Ôì·½·¨)
/**
 * ÃæÏò¶ÔÏóÖ®¶þ
 * ¹¹Ôì·½·¨(¹¹Ôì»ú):
 *
 * 1,¹¹Ôì·½·¨µÄÌØÕ÷:
 * Ëü¾ßÓÐÓëÀàÏàͬµÄÃû³Æ£»
 * Ëü²»º¬·µ»ØÖµ£»
 * Ëü²»ÄÜÔÚ·½·¨ÖÐÓÃreturnÓï¾ä·µ»ØÒ»¸öÖµ
 * ×¢Ò⣺ÔÚ¹¹Ôì·½·¨Àï²»º¬·µ»ØÖµµÄ¸ÅÄîÊDz»Í¬ÓÚ“void”µÄ£¬ÔÚ¶¨Òå¹¹Ôì·½·¨Ê±¼ÓÁË“void”£¬½á¹ûÕâ¸ö·½·¨¾Í²»ÔÙ±»×Ô¶¯µ÷ÓÃÁË¡£
 * 2,¹¹Ôì·½·¨µÄ×÷Óãº
 * µ±Ò»¸öÀàµÄʵÀý¶ÔÏó¸Õ²úÉúʱ£¬Õâ¸öÀàµÄ¹¹Ôì·½·¨¾Í»á±»×Ô¶¯µ÷Óã¬ÎÒÃÇ¿ÉÒÔÔÚÕâ¸ö·½·¨ÖмÓÈëÒªÍê³É³õʼ»¯¹¤×÷µÄ´úÂë¡£
 * Ò²¾ÍÊÇ˵,¹¹Ôì»ú×î´óµÄ×÷ÓÃÊÇΪÀà³ÉÔ±³õʼ»¯.
 */
class Constructor
{
 private int i;
 private String str;
 //public Constructor(){}
 //µ±ÎÒÃDz»Îª´´½¨µÄÀàÌí¼Ó¹¹Ôì·½·¨Ê±,ϵͳ»á×Ô¼ºÎªÎÒÃÇÌí¼ÓÒ»¸öĬÈϵĹ¹Ôì·½·¨.
 //µ«ÊÇ,µ±ÎÒÃÇÒѾ­Îª¸ÃÀàµÄ¼ÓÉϹ¹Ôì·½·¨ºó,ÄÇôϵͳ½«²»ÔÙΪÎÒÃÇ×Ô¶¯´´½¨¹¹Ôì·½·¨ÁË.
 public Constructor()
 {
  System.out.println("default Constructor is calling");
  i = -1;
  str = "unknown";
 }
 public Constructor(int i)
 {
  System.out.println("one int type args Constructor is calling");
  this.i = i;
  str = "unknown";
 }
 public Constructor(int i,String str)
 {
  System.out.println("two args Constructor is calling");
  this.i = i;
  this.str = str;
 }
 public int getI(){return i;}
 
 public String getStr(){return str;}
}
public class ConstructFunction {
 public static void main(String[] args) {
  Constructor ctor1 = new Constructor();
  System.out.println("Constructor.i = " + ctor1.getI() + " " +
    "Constructor.str = " + ctor1.getStr());
  Constructor ctor2 = new Constructor(20);
  System.out.println("Constructor.i = " + ctor2.getI() + " " +
    "Constructor.str = " + ctor2.getStr());
  Constructor ctor3 = new Constructor(30,"Co


Ïà¹ØÎĵµ£º

javaÈëÃÅ

 Javaѧϰ´ÓÈëÃŵ½¾«Í¨ 
Ò»¡¢ JDK (Java Development Kit) 
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......

½âÎöJavaÀàºÍ¶ÔÏóµÄ³õʼ»¯¹ý³Ì

ÀàµÄ³õʼ»¯ºÍ¶ÔÏó³õʼ»¯ÊÇ JVM ¹ÜÀíµÄÀàÐÍÉúÃüÖÜÆÚÖзdz£ÖØÒªµÄÁ½¸ö»·½Ú£¬Google ÁËÒ»±éÍøÂ磬ÓйØÀà×°ÔØ»úÖƵÄÎÄÕµ¹ÊDz»ÉÙ£¬È»¶øÀà³õʼ»¯ºÍ¶ÔÏó³õʼ»¯µÄÎÄÕ²¢²»¶à£¬ÌرðÊÇ´Ó×Ö½ÚÂëºÍ JVM ²ã´ÎÀ´·ÖÎöµÄÎÄÕ¸üÊÇÏÊÓÐËù¼û¡£
±¾ÎÄÖ÷Òª¶ÔÀàºÍ¶ÔÏó³õʼ»¯È«¹ý³Ì½øÐзÖÎö£¬Í¨¹ýÒ»¸öʵ¼ÊÎÊÌâÒýÈ룬½«Ô´´úÂëת»»³É JVM ×Ö½ÚÂëºó£¬ ......

java GC Àí½â

Ò»¸öÓÅÐãµÄjava±à³Ì³ÌÐòÔ±±ØÐëÁ˽âGCµÄ¹¤×÷Ô­Àí¡¢ÈçºÎÓÅ»¯GCµÄÐÔÄÜ¡¢ÈçºÎÓëGC½øÐÐÓÐÏ޵Ľ»»¥£¬ÒòΪÓÐһЩӦÓóÌÐò¶ÔÐÔÄÜÒªÇó½Ï¸ß£¬ÀýÈçǶÈëʽϵͳ¡¢ÊµÊ±ÏµÍ³µÈ£¬Ö»ÓÐÈ«ÃæÌáÉýÄÚ´æµÄ¹ÜÀíЧÂÊ £¬²ÅÄÜÌá¸ßÕû¸öÓ¦ÓóÌÐòµÄÐÔÄÜ¡£±¾ÆªÎÄÕÂÊ×Ïȼòµ¥½éÉÜGCµÄ¹¤×÷Ô­ÀíÖ®ºó£¬È»ºóÔÙ¶ÔGCµÄ¼¸¸ö¹Ø¼üÎÊÌâ½øÐÐÉîÈë̽ÌÖ£¬×îºóÌá³öһЩjava± ......

java ÂÒÂë

1¡£Êý¾Ý¿â 
ÔÚ´´½¨µÄʱºò£¬Ö¸¶¨Æä±àÂëΪUTF-8. 
  £¨1£©oracle: 
SQL> select userenv('language') from dual; 
USERENV('LANGUAGE') 
--------------------------------------------- 
SIMPLIFIED CHINESE_CHINA.UTF8 
SQL> 
jdbc urlÎÞÐëÖ¸¶¨±àÂë¡£ 
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ