🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

[super]������������е�super�����ú�������ʲô��

#19441
From: �����మ��һ���ˡ��չ˺��Լ�
Date: Sun, 04 Jan 2004 12:17
34 lines
1661 bytes
���ࣺ
public class Point
{
    protected double x,y;
    public Point(double x,double y)
    { setPoint(x,y);}
    public void setPoint(double x,double y)
    {this.x=x;this.y=y;}
    public String toString()
    {return "("+x+","+y+")";}
}

���ࣺ
public class MyPoint extends Point
{
    private static Point p;
    public MyPoint()
    {super(0,0);}
    public static void main(String args[])
    {
        p=new Point(0,0);
        System.out.println(p.toString());
        p.setPoint(30,50);
        System.out.println("("+p.x+","+p.y+")");

    }
}
�������super�����ú�������ʲô��
�����super�ָ�����д

--
һ���Ȼ��ǧ����շ硣

�� ��Դ:��Ʈ��ˮ�Ƽ� freecity.cnzju.net��[FROM: varush]
Technical Details
Message-ID: <4A8EUh$9mI@freecity.cnzju.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB
X-Google-Thread: f6cb0,de13a70324abe480,start
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2004-01-04 04:12:40 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity
From: varush.bbs@freecity.cnzju.net (�����మ��һ���ˡ��չ˺��Լ�)
Newsgroups: cn.bbs.comp.lang.java
Subject: [super]������������е�super�����ú�������ʲô��
Date: 04 Jan 2004 12:17:38 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <4A8EUh$9mI@freecity.cnzju.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1073218507.A