Article View: cn.bbs.comp.lang.java
Article #19329�ܲ��ܰ��ҷ���һ��Tutorial ������⣿��
From: ��Giggs��
Date: Wed, 07 Jan 2004 04:08
Date: Wed, 07 Jan 2004 04:08
27 lines
1764 bytes
1764 bytes
Consider the following class:
public class IdentifyMyParts {
public static int x = 7;
public int y = 3;
}
a. How many class variables does the IdentifyMyParts class contain? What are t
heir names?
b. How many instance variables does the IdentifyMyParts class contain? What ar
e their names?
c. What is the output from the following code:
IdentifyMyParts a = new IdentifyMyParts();
IdentifyMyParts b = new IdentifyMyParts();
a.y = 5;
b.y = 6;
a.x = 1;
b.x = 2;
System.out.println("a.y = " + a.y);
System.out.println("b.y = " + b.y);
System.out.println("a.x = " + a.x);
System.out.println("b.x = " + b.x);
--
[32mֻ��AC�����İ͵�˹ͼ��ͻ�������ᣬһ����ճ��䣬���������˳���
[m[1;36m�� ��Դ:��Ʈ��ˮ�Ƽ� freecity.cnzju.net��[FROM: chujl][m
Technical Details
Message-ID:
<4AAIIC$9WG@freecity.cnzju.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!sjc70.webusenet.com!news.webusenet.com!news.bylinux.net!news.ccie.net.cn!FreecityShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB X-Google-Thread: f6cb0,4dbf651c02abbc7d,start X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2004-01-06 20:02:29 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!sjc70.webusenet.com!news.webusenet.com!news.bylinux.net!news.ccie.net.cn!Freecity From: chujl.bbs@freecity.cnzju.net (��Giggs��) Newsgroups: cn.bbs.comp.lang.java Subject: �ܲ��ܰ��ҷ���һ��Tutorial ������⣿�� Date: 07 Jan 2004 04:08:06 GMT Organization: Ʈ��ˮ�Ƽ� Message-ID: <4AAIIC$9WG@freecity.cnzju.net> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: Java/M.1073448300.A Lines: 27