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


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

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

X-Received by 10.66.82.103 with SMTP id h7mr9871251pay.11.1357494233539; Sun, 06 Jan 2013 09:43:53 -0800 (PST)
Received by 10.50.220.231 with SMTP id pz7mr1161665igc.8.1357494233501; Sun, 06 Jan 2013 09:43:53 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!f6no7925199pbd.1!news-out.google.com!s9ni85391pbb.0!nntp.google.com!f6no7925193pbd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Sun, 6 Jan 2013 09:43:53 -0800 (PST)
In-Reply-To <a507821e-173c-447f-a310-bb98f425f097@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
NNTP-Posting-Host 173.164.137.214
References <public-20130106091348@ram.dialup.fu-berlin.de> <a507821e-173c-447f-a310-bb98f425f097@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <e1778471-c18f-46e6-9a7e-d7d312d684c3@googlegroups.com> (permalink)
Subject Re: "Hello world!" without a public class?
From Lew <lewbloch@gmail.com>
Injection-Date Sun, 06 Jan 2013 17:43:53 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.java.programmer:21043

Show key headers only | View raw


Aryeh M. Friedman wrote:
>>     1.) »public class HelloWorldApp« (because this is most common IIRC)
>
> 
> This the most common they are going to run into in real life and when you get in inheritance explain the difference between the 4 options.   You should also point out (I know I will get flamed for this ;-)) that the only time you do not want to use "public" is in inner classes (which in my opinion should be outlawed anyways)

Do you really mean just inner classes? Would you ban all nested classes 
outright?

It would be a very, very boneheaded thing to outlaw inner classes. 
You'd destroy a common idiom for declaring listeners. You'd make lambdas 
impossible. You'd kill one of the most expressive features of Java, that 
was introduced to the language in the first place because of its great 
power.

You are aware that nested classes were added to Java, not there from the 
beginning, yes? There were excellent reasons to do that.

Study the matter.

-- 
Lew

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? "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com> - 2013-01-06 02:10 -0800
  Re: "Hello world!" without a public class? Lew <lewbloch@gmail.com> - 2013-01-06 09:43 -0800
    Re: "Hello world!" without a public class? "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com> - 2013-01-06 09:51 -0800
      Re: "Hello world!" without a public class? Lew <lewbloch@gmail.com> - 2013-01-06 09:58 -0800
        Re: "Hello world!" without a public class? "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com> - 2013-01-06 10:48 -0800
          Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 16:07 -0500
            Re: "Hello world!" without a public class? "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com> - 2013-01-06 13:21 -0800
              Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 16:43 -0500
          Re: "Hello world!" without a public class? Lew <lewbloch@gmail.com> - 2013-01-06 17:24 -0800
      Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 15:59 -0500
        Re: "Hello world!" without a public class? "Aryeh M. Friedman" <Aryeh.Friedman@gmail.com> - 2013-01-06 13:22 -0800
          Re: "Hello world!" without a public class? Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 16:35 -0500

csiph-web