Java·ÃÎÊȨÏÞdzÎö
Java·ÃÎÊȨÏÞÒ»¹²ÓÐËÄÖÖ£¬ËûÃÇÖ®¼äµÄ·ÃÎÊȨÏޱȽÏͨ¹ýÒÔÏÂÒ»×éÀý×ÓÀ´½âÊÍ
Àý×Ócode£ºModiferDemo.java
package com.glust.blog.j2se;
public class ModiferDemo{
//ËÄÖÖ·ÃÎÊȨÏ޵ıäÁ¿£¨ÊôÐÔ£©
private int a;
int b;//friendly
protected int c;
public int d;
//·ÃÎÊÊôÐԵĽӿÚ
public int getA(){
return a;
}
public void setA(int a){
this.a = a;
}
}
Àý×ÓtestCode1£º TestModiferDemo1.java
import com.glust.blog.j2se.ModiferDemo;
class TestModiferDemo1{
public static void main(String[] args){
ModiferDemo obj = new ModiferDemo();
System.out.println(" a is " + obj.a);//error,private·ÃÎÊȨÏÞÖ»ÄÜÔÚÀàÌåÖпɼû
System.out.println(" b is " + obj.b);//error,friendly
System.out.println(" c is " + obj.c);//error,protected
System.out.println(" d is " + obj.d);
}
}
Àý×ÓtestCode2£º TestModiferDemo2.java
import com.glust.blog.j2se.ModiferDemo;
class TestModiferDemo2 extends ModiferDemo{
public static void main(String[] args){
ModiferDemo obj = new ModiferDemo();
System.out.println(" a is " + obj.a);//error£¡private·ÃÎÊȨÏÞÖ»ÄÜÔÚÀàÌåÖпɼû
System.out.println(" b is " + obj.b);//error£¡friendly·ÃÎÊȨÏÞͬ°üÖеÄÆäËûÀà¿ÉÒÔ·ÃÎÊ
System.out.println(" c is " + obj.c);//ÕýÈ·£¡protected·ÃÎÊȨÏÞ£¬×ÓÀàÖпÉÒÔ·ÃÎÊ
System.out.println(" d is " + obj.d);
}
}
Àý×ÓtestCode3£º TestModiferDemo3.java
package com.glust.blog.j2se;
import com.glust.blog.j2se.ModiferDemo;
class TestModiferDemo3{
public static void main(String[] args){
ModiferDemo obj = new ModiferDemo();
System.out.println(" a is " + obj.a);//error£¡private·ÃÎÊȨÏÞÖ»ÄÜÔÚÀàÌåÖпɼû
System.out.println(" b is " + obj.b);//ÕýÈ·£¡frien
Ïà¹ØÎĵµ£º
½ñÌì·¢ÏÖÒ»¸öºÜNBµÄÍæÒ⣬ÈÃÎÒÃÇÔÚ¿ª·¢µÄʱºòÐÞ¸ÄJavaÎļþ£¬²»ÓÃÖØÆô·þÎñÆ÷Á¢¿ÌÉúЧ£¡Ö§³ÖJetty tomcat jbossµÈºÜ¶à·þÎñÆ÷£¬Ëü¾ÍÊÇJRebel¡£ http://www.zeroturnaround.com/jrebel/installation/ ÕâÀïÓÐÕë¶Ô²»Í¬·þÎñÆ÷µÄ°²×°·½·¨£¬»ù±¾ÉÏÖ÷Á÷µÄ¶¼º¸ÇÁË£¬¾ø´ó¶àÊý³ÌÐòÔ±¶¼ÄÜʹÓã¡ÎÒÃǹ«Ë¾ÓÃmaven/jetty¶ÔÏîÄ¿½øÐй¹½¨ºÍ¿ª ......
http://campus.chsi.com.cn/xy/com/200909/20090923/33536175.html
¼ÆËã»ú¶þ¼¶java¸¨µ¼£ºÊÕ¼¯µÄÕýÔò±í´ïʽ
À´Ô´£º¿¼ÊÔ´ó 2009Äê09ÔÂ23ÈÕ 10:50
¡¡¡¡ÕýÔò±í´ïʽÊǸöºÜ²»´íµÄ¶«Î÷£¬¿ÉÒÔÈÃÄãʹÓÃÖ¸¶¨µÄģʽȥ·ÖÎö×Ö·û´®£¬µ±ÄêPerlͨ¹ýÌṩÁËÀàËÆÕýÔò±í´ïʽµÄ¹¦ÄܺóÀ´¶À²½ÎäÁÖ£¬ºÃ²»·ç¹â(²»¹ý ......
1. JDBC Çý¶¯³ÌÐò
1.1 DB2 JDBC Type 2 Çý¶¯³ÌÐò
DB2 ¿Í»§»ú
²»½¨ÒéʹÓÃ
COM.ibm.db2.jdbc.app.DB2Driver µ÷ÓÃClass.forName() ·½·¨¡£
1.2 IBM DB2 ͨÓÃJDBC ºÍSQLJ Çý¶¯³ÌÐò
ÌṩÁËType 2 Á¬½ÓÐÔºÍType 4 Á¬½ÓÐÔ
¿ÉÒÔ½«Õâ¸öÇý¶¯³ÌÐòÓÃÓÚapp ......
×÷ÕߣºÎ´Öª À´Ô´£ºÔ¹âÈí¼þÕ¾ ¼ÓÈëʱ¼ä£º2005-5-13¡¡Ô¹âÈí¼þÕ¾
ÔÌ⣺ ¹ØÓÚJavaÕ»Óë¶ÑµÄ˼¿¼[/B]
1. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJava[/B]ÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java[/B]×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
¡¡¡¡2. Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ ......