🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: һ���򵥵ô��룬��Ұ�æ����

#22993
From: ��������
Date: Sun, 24 Aug 2003 01:48
44 lines
2788 bytes
�о����get ����д���е�����,һ���get��������return ����������Ҫ��ֵ
��
class test{
  private Point point = new point();

  public test(){
    point.x = 10;
    point.y = 10;
  }

  public Point getPoint(){

    return point;
  }
}
����д�ȽϺ�,���ٽ��ⲿ�ı���������ĺ����︳ֵ��

����ʾ����,�Ǿ���main �������ٶ���һ������,��������Ϊ��
//
public static void main(String args[]){
  class test t = new test();
  Point p = test.getPoint();
  System.out.println(p);

}
����,��Ա�������������private��!

�� �� yyfsk.bbs@bbs.sjtu.edu.cn (���) �Ĵ������ᵽ: ��
: ������Ҫ��xValue��yValue��ֵ��ʾ����
: Ӧ����ô�޸��أ���
: �� �� jawahh (�����ӽ�����....) �Ĵ������ᵽ: ��
: : p.xValue��p.yValue�����ﶨ����?
: : Ӧ����p.x��p.y��?
: : .................������ʡ�ԣ�


--
          *                      ��                                       
  *                /         *             *           *       _________  
      ��          *                                ��         /\        \ 
                                                             /  \________\
                                     \�� /��\                |  |        |
�x�y�z�{�|�}�~�����~�}�|�{�z�y�x______�~\/�~\�x�y�z�{�z�y�z�y|  | ��  �� |
�� ��Դ:���ɽ��ˮ bbs.neu.edu.cn��[FROM: һ���ͿBBS]
Technical Details
Message-ID: <4802U5$CCx@bbs.neu.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsgate.cuhk.edu.hk!news.zixia.net!news.neu.edu.cn!NEU

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,3fe96db6a060a989
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-08-23 18:49:03 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsgate.cuhk.edu.hk!news.zixia.net!news.neu.edu.cn!NEU
From: fat3rd.bbs@bbs.neu.edu.cn (��������)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: һ���򵥵ô��룬��Ұ�æ����
Date: 24 Aug 2003 01:48:41 GMT
Organization: ��ɽ��ˮ
Message-ID: <4802U5$CCx@bbs.neu.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: java/M.1061689253.A
Lines: 44