Article View: cn.bbs.comp.lang.java
Article #23333Java question 2
From: temporary
Date: Fri, 01 Aug 2003 03:15
Date: Fri, 01 Aug 2003 03:15
16 lines
1620 bytes
1620 bytes
1.Explain the difference between class and instance methods/members.How can this be expressed in your code? 2.Can class methods/members be used in instance methods? Explain why (not). 3.Can class instance methods/members be used in class methods? Explain why ( not). 4.In software engineering,solutions to common design problems are often call ed design patterns. One of them is called Singleton and it describes how one can make sure that a certain class can have only instance during a program' s life-cycle.How would you implement such a Singleton class in Java? 5.How would you check that you can indeed have only one instance? 6.Expalin the following lines of code(assume they are correct): (1) public static final int LEN=100; (ii) protected final void outputString(char a) (iii) private GreatRace() -- [m[1;36m�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 202.120.25.44][m
Technical Details
Message-ID:
<47U6Ek$AKT@bbs.sjtu.edu.cn>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!news.neu.edu.cn!SJTUShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB X-Google-Thread: f6cb0,14fcebdb4af15f71,start X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-07-31 20:19:28 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!news.neu.edu.cn!SJTU From: temporary.bbs@bbs.sjtu.edu.cn (temporary) Newsgroups: cn.bbs.comp.lang.java Subject: Java question 2 Date: 01 Aug 2003 03:15:54 GMT Organization: ��ˮ˼Դ Message-ID: <47U6Ek$AKT@bbs.sjtu.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: Java/M.1059707086.A Lines: 16