🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #18491

Re: [��]���ʿ���һ�ʡ�

#18491
From: ������
Date: Tue, 10 Feb 2004 09:13
38 lines
2127 bytes
package A;
public interface A {
    void doStuff();
}
class MyA implements A {
    public void doStuff() {
        System.out.println("hello");
    }
}
public abstract class AFactory {
    public static A createA() {
        return new MyA();
    }
}

package B;
public class B {
    public static void main(String[] args) {
        A a = A.AFactory.createA();
        a.doStuff();
    }
}
�� �� romie (Raymond) �Ĵ������ᵽ: ��
: Ŷ����û����inner class�������Ժ������һ�¡�
: ���о�����̴����ˡ���û�м�̵����Ӵ��룿��һ����
: ��������⡣^^
: �� �� windprayer (������) �Ĵ������ᵽ: ��
: : ����
: : ����override���super class/interface��public method
: : �������Ϊһ��super class/interface��ʵ����package�ⱻʹ��
: : �����anonymous inner class


--
 ���� ��Ĭ ���� ��� �ڼ� ���� �Ͽ� ���� ���� ��� �侲 ���

�� �����޸�:��windprayer � Feb 10 17:13:13 �޸ı������ݡ�[FROM: 10.11.71.253]
�� ��Դ:��Ʈ��ˮ�Ƽ� freecity.cnzju.net��[FROM: 10.11.71.253]
Technical Details
Message-ID: <4Ab5Dg$9KV@freecity.cnzju.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!sjc70.webusenet.com!news.usenetserver.com!news.bylinux.net!news.ccie.net.cn!Freecity

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB
X-Google-Thread: f6cb0,b80e1f7e61bef9f4
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2004-02-10 01:15:59 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!sjc70.webusenet.com!news.usenetserver.com!news.bylinux.net!news.ccie.net.cn!Freecity
From: windprayer.bbs@freecity.cnzju.net (������)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: [��]���ʿ���һ�ʡ�
Date: 10 Feb 2004 09:13:13 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <4Ab5Dg$9KV@freecity.cnzju.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1076404122.A
Lines: 38