Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #21020
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Sun, 06 Jan 2013 07:15:51 -0600 |
| From | "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> |
| Newsgroups | comp.lang.java.programmer |
| References | <public-20130106091348@ram.dialup.fu-berlin.de> |
| Subject | Re: "Hello world!" without a public class? |
| Date | Sun, 6 Jan 2013 13:09:45 -0000 |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| X-RFC2646 | Format=Flowed; Original |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| Message-ID | <-8CdnaTS2P6a5HTNnZ2dnUVZ8vOdnZ2d@bt.com> (permalink) |
| Lines | 24 |
| X-Usenet-Provider | http://www.giganews.com |
| X-AuthenticatedUsername | NoAuthUser |
| X-Trace | sv3-PVmOh/o2ZGm1vOC+ixUuZdwXka9iqpkNVowaQ95Oqf4VI41m7KAyAXFQ/SR2BvfSZs956waBqc/B9eh!HOZWzPbw5AKYrRDRebnc6gUmhzhOcV+LQjbeOWF3UQYPaHu2jvP8QWqo+BtadPn0VE9pYh4+a/0= |
| X-Complaints-To | abuse@btinternet.com |
| X-DMCA-Complaints-To | abuse@btinternet.com |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2250 |
| Xref | csiph.com comp.lang.java.programmer:21020 |
Show key headers only | View raw
Stefan Ram wrote:
> There is no »public« in front of »class« in Oracles Tutorial!
>
> What should I teach in my classes?
I don't have a strong opinion on how the class should be declared, but I do
think -- and very strongly -- that the Java entry-point convention is a massive
kludge, highly non-representative of how any sane OO code would be written, and
not at all an example to be followed. As such, I think it would benefit your
students if you made that very clear to them from the start (yes, there is a
risk of confusion, but no student will be confused who wouldn't otherwise
probably be mislead -- which is worse).
FWIW: the examples in the JLS3 all use an default access class to house the
(specified to be required) public static void main(String args...) or public
static void main(String[] args) entry-point. The spec does not appear to care
what access the class itself has (and there's no obvious reason -- technical or
semantic -- why it should). Does "private" work ? If so then using that would
be defensible.
-- chris
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Re: "Hello world!" without a public class? "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-01-06 13:09 +0000
Re: "Hello world!" without a public class? "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com> - 2013-01-06 05:19 -0800
Re: "Hello world!" without a public class? "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com> - 2013-01-06 05:28 -0800
Re: "Hello world!" without a public class? lipska the kat <lipskathekat@yahoo.co.uk> - 2013-01-06 13:36 +0000
Re: "Hello world!" without a public class? "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-01-06 13:44 +0000
Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 10:49 -0500
Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 11:45 -0500
Re: "Hello world!" without a public class? Martin Gregorie <martin@address-in-sig.invalid> - 2013-01-06 19:44 +0000
Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 16:09 -0500
Re: "Hello world!" without a public class? Martin Gregorie <martin@address-in-sig.invalid> - 2013-01-06 21:46 +0000
Re: "Hello world!" without a public class? "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-01-06 14:02 +0000
Re: "Hello world!" without a public class? "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-01-06 14:12 +0000
Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 10:42 -0500
csiph-web