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

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


Ïà¹ØÎĵµ£º

javaÉú³Édoc html

 
javaÉú³Éword,htmlÎļþ²¢½«ÄÚÈݱ£´æÖÁÊý¾Ý¿â
Posted on 2005-12-15 17:19 Kela ÔĶÁ(3126) ÆÀÂÛ(3)  ±à¼­  ÊÕ²Ø
       ÔÚ×î½üµÄÒ»¸öÏîÄ¿ÖÐÐèÒª½«Ò»¶Î×Ö·ûÀàÐ͵ÄÎı¾´æΪword£¬html²¢Òª½«wordµÄÄÚÈݱ£´æÔÚÊý¾Ý¿âÖУ¬ÓÚÊ ......

°Ñjava¿ª·¢µÄÓ¦ÓóÌÐò×ö³É°²×°³ÌÐò

·½·¨Ò»£º
   ÈôʹÓÃJBuilder7£¬²½ÖèÈçÏ£º 1¡¢Ê×ÏȽ¨Á¢¹¤³Ì£¬Application¡£ÕâЩ¾Í²»ÐèÒªÏêϸ˵Ã÷¡£ 2¡¢Ñ¡Ôñ²Ëµ¥WizardsϵÄarchive Builder 3¡¢ÔÚarchive typeÖÐÑ¡ÔñApplication 4¡¢ÔÚNameÑ¡ÏîÖиø¿ÉÖ´ÐгÌÐòÆðÃû£¬ÆäËûÑ¡ÏîĬÈÏ 5¡¢°üº¬½ø¸Ã¹¤³ÌÖÐËùÓеÄÀàºÍ×ÊÔ´ 6¡¢º¬Àà¿âÖÐËùÓеÄÀàºÍ×ÊÔ´ 7¡¢ÏÂÃæÁ½²½Ä¬ÈÏ 8¡¢ ......

JavaɳÏäµÄʵÏÖ

JavaɳÏäʵÏÖÊÇÖØдÀà¼ÓÔØÆ÷ºÍ°²È«¹ÜÀíÆ÷,ͨ¹ýÉèÖõÄÈ«¾Ö°²È«¹ÜÀíÆ÷À´¿ØÖÆÖ´ÐгÌÐòµÄȨÏÞ
˵Ã÷: °²È«²ßÂÔÖ»¶Ô°²×°°²È«¹ÜÀíÆ÷Ö®ºóµÄÀàÉúЧ,֮ǰµÄÀ಻Ôٴ˹ÜÀí·¶Î§Ö®ÄÚ,ÀûÓÃÕâÒ»µã¿ÉÒÔÔ¤ÏÈÉèÖÃÎÒÃÇÐèÒªµÄ²Ù×÷,¶ø¶Ôij¸öµãÖ®ºóµÄËùÓзǷ¨²Ù×÷½øÐÐȨÏÞÉèÖÃ.
Àà¼ÓÔØÆ÷ÖØд
/**
* [ÖØдµÄÀà¼ÓÔØÆ÷]
* ɳÏä³ÌÐòÀà¼ÓÔØÆ÷,¿ ......

̸һ̸ÎÒѧϰJava web±à³ÌµÄ¾­Àú

     ÎÒÏÖÔÚÊÇ´óÈýµÄѧÉú£¬ÎÒÔÚÊî¼Ù¿ªÊ¼½Ó´¥Java web±à³Ì£¬ÏÖÔڲ¶àѧÁËÓаëÄêÁË°É¡£ÄÇʱJava×Ô¼ºÒ»µãÁ˲»¶®£¬¼ÇµÃÉÏÍøÒ³Éè¼ÆÀÏÊÇÌáÆðjsp£¬ÊǵÚÒ»´Î½Ó´¥µ½Java¡£´ÓÄÇʱ×Ô¼º¾ÍÔÚͼÊé¹Ý½èÔĹØÓÚJavaµÄÊé¼®¡£Êî¼ÙºÍ¼¸¸öͬѧҲ²Î¼ÓÁËÒ»¸ö¹ØÓÚweb±à³ÌµÄ±ÈÈü£¬ÄÇʱÎÒÃÇËÄÈËÿÌ춼ÔÚʵÑéÊÒÖÐ×ö±ÈÈüµÄÌâÄ¿¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ