Ò»¸öÈÃ98%java³ÌÐòÔ±·¸ÄѵÄÎÊÌâµÄ˼¿¼
Ô´´úÂ룺
public class Parent
{
protected void test() {}
public Parent()
{
this.test();
}
public static void main(String[] args)
{
new Child();
}
}
class Child extends Parent
{
private int instanceValue = 1£»
public void test()
{
System.out.println("instance value is: " + instanceValue);
}
}
--------------------------------------------
´Ë³ÌÐòµÄÊä³ö½á¹ûΪinstance value is:0£¬¿ÉÄܺܶàÈË£¨°üÀ¨ºÜ¶àÀϳÌÐòÔ±£©¶¼»áÏ뵱ȻµÃÒÔΪÊä³ö½á¹ûΪ1£¬»òÕß²»»áÓÐÊä³ö£¬»òÕßÈÏΪÕâ¸ö³ÌÐò±¾Éí¾ÍÊÇ´íµÄ£¨ÎÒµÄÀÏʦ¾ÍÊÇÕâôÈÏΪµÄ£¬ºÇºÇ~£©
¿´Á˺ܶàÓйØÕâ¸öÎÊÌâµÄÌÖÂÛ£¬ÏÖÔÚÌá³öÒ»µãÎҵļû½â£º
·ÖÎö£ºÕâ¸öÎÊÌâÊ×ÏÈÉæ¼°µÄ֪ʶÊÇÀà¼ÓÔØ·ÖΪÈý¸ö¹ý³Ì£º×°ÔØ¡¢Á´½Ó¡¢³õʼ»¯£¬ÓйØÕâ¸ö֪ʶÎÒÔÚ֮ǰµÄÌû×Ó“Àà¼ÓÔØ·ÖΪÈý¸ö¹ý³Ì£º×°ÔØ¡¢Á´½Ó¡¢³õʼ»¯”ÖÐÓÐרÃÅÌáµ½¹ý£¬¶øÕæÕýÁ˽âÕâ¸ö֪ʶµÄÈ˲¢²»¶à£¬ËùÒÔ²ÅÓÐÁËÈç±êÌâËù˵µÄ½á¹û~
OK£¬ÏÖÔÚÎÒÃÇÀ´¿ªÊ¼Ò»²½²½·ÖÎö£ºÊ×ÏȼÓÔØclassÎļþ£¬¶ÔÀàÖеıäÁ¿½øÐÐÄÚ´æ·ÖÅ䣨ÉùÃ÷£©£¬´ËʱinstanceÊÇʵÀý±äÁ¿£¬¼ÓÔØµÄʱºò²¢²»»á¶ÔÆä½øÐÐÕæÕýµÄ³õʼ»¯£¨¼´²»»á°Ñ1¸³¸øËü£¬ËüÖ»»áµÃµ½ÏµÍ³¸øËüµÄĬÈÏÖµ0£¬ÕâÊÇÎÊÌâµÄ¹Ø¼ü£©¡£
½ÓÏÂÀ´¾ÍÒªÖ´ÐÐmain·½·¨ÌåÁË£¬ok£¬ËüÀïÃæÖ»ÓÐÒ»ÌõÓï¾ä£¬newÒ»¸ö×ÓÀà¶ÔÏ󣬵÷ÓÃ×ÓÀàĬÈϹ¹ÔìÆ÷µÄʱºòÒªÏȵ÷Óø¸ÀàµÄÎ޲ι¹ÔìÆ÷£¬¸¸À๹ÔìÆ÷Õâʱ»áµ÷Óø¸ÀàµÄtest·½·¨£¬¸ù¾Ý¶à̬ÔÀí£¬¸Ãtest·½·¨½«»á±»×ÓÀàµÄtest¸²¸Ç£¬×ÓÀà·½·¨½«»á´òÓ¡Ò»ÌõÓï¾ä£¬¶ø´Ëʱinstance±äÁ¿²¢Î´±»³õʼ»¯£¬¹Ê´òÓ¡µÄ½á¹ûΪ0.ÕâÀïµÄthis.test£¨£©·½·¨µ÷ÓÿÉÄܲ»ÊǺܺÃÀí½â£¬ÒòΪËüÒѾÓÃthis±íÃ÷µ÷Óø¸Àà·½·¨£¬´ËʱËüÊDz»ÖªµÀ×ÓÀàÒѾ¸²¸ÇÁ˸¸ÀàµÄÕâ¸ö·½·¨£¬¹ØÓÚÕâÒ»µã£¬Ä¿Ç°»¹ÕÒ²»µ½½âÊ͵ķ½·¨£¬¹ÃÇÒ°ÑËüÀí½âΪ¶à̬»úÖÆ°É¡£
ºÃÁË£¬ÏÖÔÚÎÒÃǰѳÌÐòÉÔ΢¸Ä¶¯Ò»Ï£¬¾ÍÊǰÑprivate int instanceValue = 1£»¸ÄΪprivate static int instanceValue = 1£»´ËʱÊä³öµÄ½á¹û¾ÍΪ1ÁË£¬ÒòÎ
Ïà¹ØÎĵµ£º
1.PaginationTable.java
package com.sinoest.train.common;
import java.util.List;
/**
* ·ÖÒ³±í
* @author ÀîÒ×烜-ÐÞ¸Ä
* 2009-6-17
*/
public class PaginationTable {
private List<?> entryList;//> Êý¾Ý
private int totalNumOfRows;// ×ÜÐÐÊý
private int rowsPerPage = 10;// ......
À´×Ô:http://www.cnblogs.com/shiyangxt/archive/2008/07/30/1256813.html
»·¾³£ºMyEclipse
Êý¾Ý¿â£ºmysql
Ê×ÏÈн¨JavaÏîÄ¿£¬È»ºóн¨Á½¸öÀ࣬һ¸öÊý¾Ý¿âÁ¬½Ó³ØÀ࣬һ¸ö²âÊÔÀà¡£
·Ö±ðÃüÃûConnectionPool£¬ConnectionPoolTest¡£
È»ºóн¨Ò»¸öÅäÖÃÎļþ£¬ÃüÃû£ºdbpool.properties¡£
&n ......
Java³£ÓÃ×Ö·û¼¯±àÂëÏê½â
Web¿ª·¢µÄʱºò¾³£»áÓöµ½Ò»Ð©×Ö·û±àÂëµÄ´íÎó£¬ÈçÒ³ÃæÂÒÂëµÈÎÊÌ⣬ËùÒÔÓбØÒªÐè¶Ô×Ö·û±àÂëÓÐËùÁ˽⣬ÒÔÏÂÊÇRickiÊÕ¼¯µÄһЩ×ÊÁÏ£¨¿ÉÄܲ»ÊǺÜÈ«£¬µ«Ï£Íû¶ÔÄãÓÐËù°ïÖú£©
Java±ê×¼×Ö·û¼¯£ºËùνJava±ê×¼×Ö·û¼¯£¬¾ÍÊÇJavaƽ̨֧³ÖµÄ×Ö·û ......
JAVA·´Éä»úÖÆ
¸ÅÊö
¡¡¡¡ÓÐʱºòÎÒÃÇ˵ij¸öÓïÑÔ¾ßÓкÜÇ¿µÄ¶¯Ì¬ÐÔ£¬ÓÐʱºòÎÒÃÇ»áÇø·Ö¶¯Ì¬ºÍ¾²Ì¬µÄ²»Í¬¼¼ÊõÓë×÷·¨¡£ÎÒÃÇÀÊÀÊÉϿڶ¯Ì¬°ó¶¨£¨dynamic binding£©¡¢¶¯Ì¬Á´½Ó£¨dynamic linking£©¡¢¶¯Ì¬¼ÓÔØ£¨dynamic loading£©µÈ¡£È»¶ø“¶¯Ì¬”Ò»´ÊÆäʵûÓоø¶Ô¶øÆÕ±éÊÊÓõÄÑϸñ¶¨Ò壬ÓÐʱºòÉõÖÁÏñ¶ÔÏóµ¼Ïòµ±³õ±»µ¼Èë±à³ ......