That would be because Getters and Setters are public methods rather than
classes.. no?  It seems the original post was pointing out that there can be
only one public class which calls the "main" method.

Tref Gare
Web Developer MCSD/SCJP
eCommerce Group
Phone:  (03) 9221 4106
Mobile: 0409 556 478
Fax:    (03) 9941 4295

> -----Original Message-----
> From: Duffey, Kevin [SMTP:[EMAIL PROTECTED]]
> Sent: Monday,14 January 2002 2:04
> To:   [EMAIL PROTECTED]
> Subject:      Re: A java question.
>
> I think the poor chap was confused. If you can only have one public class,
> what the hell is the JavaBean spec trying ot say? I mean, how would all
> those public getter/setter methods be possible?
>
>       -----Original Message-----
>       From: Robert Burdick [mailto:[EMAIL PROTECTED]]
>       Sent: Sunday, January 13, 2002 4:22 PM
>       To: [EMAIL PROTECTED]
>       Subject: Re: A java question.
>
>
>       Say what?!?  I've written tons of Java applications that have more
> than one public class.
>
>       At 12:02 PM 1/13/2002 -0500, you wrote:
>
>
>               Rule No. 1 in Java: if you have more than one class in your
> application, you only can use "public" key word in the class which has
> main method (public static void main( ) ...).  Try the following code and
> name your file as Test2.java (not Test.java):
>
>               class Test implements Runnable {    // remove public key
> word here
>               public void run() {
>               for (int i=1; i<=10; i++){
>               System.out.println("Test:"+i);
>               }
>               }
>               }
>
>               public class Test2 {   // add public keyword here if you
> want to
>
>               public static void main (String args[]){
>
>                Test te = new Test();
>                Thread t = new Thread(te);
>                t.start();
>
>               }
>               }
>
>
>               Compile Test2.java and run it:
>
>               C:\>java Test2
>
>
>               Cheer.
>
>
> --------------------------------------------------------------------------
> -------------------------------------------
>       Robert Burdick
>       Author, "Essential Windows CE Application Programming", John Wiley
> and Sons
>       Co-author, "Professional JSP, 2nd Edition", Wrox Press
>       Microsoft eMVP
>
>       [EMAIL PROTECTED]
>       www <http://www.wappearances.com/>.wAppearances.
>       com <http://www.wappearances.com/>(650)-917-8446 (office)
>       (650)-906-3707 (cell)
>
> ==========================================================================
> = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at:
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to