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?

Newsgroups comp.lang.java.programmer
Date 2013-01-06 05:19 -0800
References <public-20130106091348@ram.dialup.fu-berlin.de> <-8CdnaTS2P6a5HTNnZ2dnUVZ8vOdnZ2d@bt.com>
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>

Show all headers | 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