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

java±Ê¼Ç(1)


public class Parent {
    private String name;
    public String getName() {
return name;
    }
    public void setName(String name) {
this.name = name;
    }
    public void ppublicMethod(){
        System.out.println("parent public method");
    }
    private void pprivateMethod(){
        System.out.println("parent private method");
    }
}
public class Child extends Parent{
    public void cpublicMethod(){
        System.out.println("child public method");
    }
    private void cprivateMethod(){
        System.out.println("child private method");
    }
    public static void main(String args[]){
        Parent child = new Child();
        child.ppublicMethod();
        //child.pprivateMethod(); //´íÎó
Child child2 = newChild();
child2.setName("shally");
System.out.println(child2.name);
    }
}
Parent child = new Child() £º Ö»ÄÜ·ÃÎʸ¸ÀàµÄ·½·¨
Child child = new Child()ÔòÁ½¸öÀàµÄ·½·¨¶¼ÄÜ·ÃÎÊ
private¹Ø¼ü×ֵĶ¨ÒåÊÇ“³ýÁË°üº¬¸Ã³ÉÔ±µÄÀàÖ®Íâ,ÆäËûÈκÎÀ඼ÎÞ·¨·ÃÎÊÕâ¸ö³ÉÔ±.”£¬Ò²¾ÍÊÇ˵ֻÓÐ×Ô¼º²ÅÄÜÖ±½Ó·ÃÎʵ½private³ÉÔ±£¬ÆäËûÈκÎÀ࣬°üÀ¨×ÓÀ඼ÎÞ·¨·ÃÎʵ½Õâ¸ö³ÉÔ±¡£
×ÓÀà¿ÉÒÔͨ¹ýnewÒ»¸ö¶ÔÏóÀ´ÒýÓø¸ÀàµÄprivate±äÁ¿¡£


Ïà¹ØÎĵµ£º

JavaÉè¼Æģʽ֮:IteratorÁ´±íģʽ

ÏÈÀ´Á˽âÒ»ÏÂÁ´±íģʽµÄÔ­Àí£º
Ê×ÏÈдһ¸öJavaBean£¬ÄÚÈÝÊÇÒªÌí¼ÓµÄÔªËغ͸ÃÔªËصĽڵ㡣
public class NodeBean implements Serializable
{
   
    private Object data; //ÔªËر¾Éí
    private NodeBean next; //ÏÂÒ»¸ö½Úµã
   
  &n ......

Java³ÌÐòÔ±µÄ֪ʶ¼Ü¹¹Ç³Îö

×÷ΪJava³ÌÐòÔ±À´Ëµ£¬×îÍ´¿àµÄÊÂÇéĪ¹ýÓÚ¿ÉÒÔÑ¡ÔñµÄ·¶Î§Ì«¹ã£¬¿ÉÒÔ¶ÁµÄÊéÌ«¶à£¬ÍùÍùÈÝÒ×ÎÞËùÊÊ´Ó¡£ÎÒÏë¾ÍÎÒ×Ô¼º¶Á¹ýµÄ¼¼ÊõÊé¼®ÖÐÌôÑ¡³öÀ´Ò»Ð©£¬°´ÕÕѧϰµÄÏȺó˳Ðò£¬ÍƼö¸ø´ó¼Ò£¬ÌرðÊÇÄÇЩÏë²»¶ÏÌá¸ß×Ô¼º¼¼ÊõˮƽµÄJava³ÌÐòÔ±ÃÇ¡£
¡¡¡¡Ò»¡¢Java±à³ÌÈëÃÅÀà
¡¡¡¡¶ÔÓÚûÓÐJava±à³Ì¾­ÑéµÄJava³ÌÐòÔ±ÒªÈëÃÅ£¬Ëæ±ã¶ÁʲôÈëÃÅÊé ......

ÂÛjava¼Ü¹¹Éè¼Æ

Èí¼þ¼Ü¹¹
×÷Ϊһ¸ö¸ÅÄÌåÏÖÔÚ¼¼Êõ
ºÍÒµÎñ
Á½
¸ö·½Ãæ¡£
´Ó¼¼Êõ½Ç¶ÈÀ´Ëµ
£ºÈí¼þ¼Ü¹¹Ëæ׿¼ÊõµÄ¸ïв»¶ÏµØ¸üÐÂÆäÄÚÈÝ£¬Èí¼þ¼Ü¹¹½¨Á¢ÓÚµ±Ç°¼¼Êõ
ºÍһЩ»ù
±¾Ô­Ôò
µÄ»ù´¡Ö®ÉÏ¡£
ÏÈ˵һЩ»ù±¾Ô­Ôò
£º
·Ö²ãÔ­Ôò
£º·Ö²ãÊÇΪÁ˽µµÍÈí¼þÉî¶È¸´ÔÓÐÔ¶øʹÓõĹؼü˼Ï룬¾ÍÏñÉç»áÓÐÁ˽׼¶Ò»Ñù£¬Èí¼þÓÐÁ˲ã´Î½á¹¹¡£
Ä£¿é»¯ ......

ÔÚ¿ØÖÆ̨ÏÂjava±àÒëÕÒ²»µ½·ûºÅ ½â¾ö·½·¨

ͨ³£Çé¿öÏ£¬ÎÒÃÇÔÚ±àдjavaÎļþʱ£¬»áÓÐÒýÓõ½×ÔÒѶ¨ÒåµÄһЩÀ࣬Èç¹û°´Í¨³£µÄjavac *.javaµÄÐÎʽÀ´±àÒë»á³öÏÖÕÒ²»µ½·ûºÅµÄ´íÎó¡£
ÒÔÏÂÌṩÁËÁ½ÖÖ·½·¨£¬ÒÔ¹©²Î¿¼
¼ÙÈçÔÚd:\web\wshÏÂÓÐa.javaºÍb.javaÁ½¸öÎļþ£¬ÔÚb.javaÎļþÖÐÓÐÒýÓÃÁËa.java¡£ÏÂÃæÊDZàÒëµÄ·½·¨
·½·¨Ò»:
½øÈëd:\web\wshÏ£º javac a.java
È»ºóÍ˳öwshÄ ......

java jxlÌí¼Óˮӡ(»ùÓÚjxl2.6.12Ð޸ıàÒë°æ)_

ÒòÊý¾Ý°²È«£¬ÐèÒª½«Éú³ÉµÄ±¨±íxls£¬Ìí¼Óˮӡ,ËùÒÔ×ÔÒÑÔÚjxlÖнøÐдúÂëÐ޸ġ£
ʹÓÃÀý×Ó
public class testJxl {
public static void main(String[] args) throws Exception {
OutputStream out = new FileOutputStream("./aaaa.xls"); // дÈëµ½FileInputStream
WritableWorkbook wwb= Workbook.createWorkbook(out);
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ