Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #21021

Re: "Hello world!" without a public class?

X-Received by 10.66.72.131 with SMTP id d3mr9739636pav.38.1357478365035; Sun, 06 Jan 2013 05:19:25 -0800 (PST)
Received by 10.49.12.97 with SMTP id x1mr9856681qeb.25.1357478364975; Sun, 06 Jan 2013 05:19:24 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!newsfeed.news.ucla.edu!usenet.stanford.edu!b8no15606685pbd.0!news-out.google.com!s9ni79141pbb.0!nntp.google.com!b8no15606684pbd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Sun, 6 Jan 2013 05:19:24 -0800 (PST)
In-Reply-To <-8CdnaTS2P6a5HTNnZ2dnUVZ8vOdnZ2d@bt.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=50.14.119.173; posting-account=lPVJQwoAAACjT2AlnY0YSj2LC4j2qtwQ
NNTP-Posting-Host 50.14.119.173
References <public-20130106091348@ram.dialup.fu-berlin.de> <-8CdnaTS2P6a5HTNnZ2dnUVZ8vOdnZ2d@bt.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <8f48da51-0eac-42cf-ab1e-f44b3cefac01@googlegroups.com> (permalink)
Subject Re: "Hello world!" without a public class?
From "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com>
Injection-Date Sun, 06 Jan 2013 13:19:25 +0000
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.java.programmer:21021

Show key headers only | View raw


On Sunday, January 6, 2013 8:09:45 AM UTC-5, Chris Uppal wrote:
> 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, 

It makes sense for historical reasons (it was designed to model the Unix/C convention [likely a hold over before the JVM itself was created]).

> 
> 
> 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.

And no *SANE* person would use the JLS to teach the language from!  That being said private is allowed for inner classes but no where else I think

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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