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


Groups > comp.lang.java.programmer > #29147 > unrolled thread

Re: Common errors in Java books

Started byRoedy Green <see_website@mindprod.com.invalid>
First post2014-07-20 23:00 -0700
Last post2014-07-23 09:44 -0700
Articles 8 — 5 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Common errors in Java books Roedy Green <see_website@mindprod.com.invalid> - 2014-07-20 23:00 -0700
    Re: Common errors in Java books Gene Wirchenko <genew@telus.net> - 2014-07-21 10:18 -0700
      Re: Common errors in Java books Roedy Green <see_website@mindprod.com.invalid> - 2014-07-21 12:32 -0700
        Re: Common errors in Java books Arne Vajhøj <arne@vajhoej.dk> - 2014-07-21 22:01 -0400
          Re: Common errors in Java books Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-22 07:43 -0400
            Re: Common errors in Java books "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-07-22 14:08 +0100
              Re: Common errors in Java books Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-22 14:53 -0400
                Re: Common errors in Java books Roedy Green <see_website@mindprod.com.invalid> - 2014-07-23 09:44 -0700

#29147 — Re: Common errors in Java books

FromRoedy Green <see_website@mindprod.com.invalid>
Date2014-07-20 23:00 -0700
SubjectRe: Common errors in Java books
Message-ID<esaps9lmmq30f341r0sk70ufjluf8uuugu@4ax.com>
On 20 Jul 2014 21:21:08 GMT, ram@zedat.fu-berlin.de (Stefan Ram)
wrote, quoted or indirectly quoted someone who said :

>      »Every statement ends with a semicolon.«
>
>      »To use a library, one has to use the import statement«
>      (these are two errors in one sentence!)
>
>      »static inner class«

I'll bite:

What statement does not require a semicolon?
Are you counting class and method definitions as statements?

You can obviously fully quality. But what is the other error?  Do you
not consider import a statement?

You can have a nested static class, but a nested inner class implies a
link to the outer object, so it cannot be static.
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Science is what we understand well enough to explain to a computer.
Art is everything else we do. 
~ Donald Ervin Knuth (born: 1938-01-10 age: 76)

[toc] | [next] | [standalone]


#29161

FromGene Wirchenko <genew@telus.net>
Date2014-07-21 10:18 -0700
Message-ID<coiqs9lvp0657so6hdhvhsujjvol4r6qm8@4ax.com>
In reply to#29147
On Sun, 20 Jul 2014 23:00:52 -0700, Roedy Green
<see_website@mindprod.com.invalid> wrote:

>On 20 Jul 2014 21:21:08 GMT, ram@zedat.fu-berlin.de (Stefan Ram)
>wrote, quoted or indirectly quoted someone who said :
>
>>      »Every statement ends with a semicolon.«
>>
>>      »To use a library, one has to use the import statement«
>>      (these are two errors in one sentence!)
>>
>>      »static inner class«
>
>I'll bite:
>
>What statement does not require a semicolon?

     Probably block statements: if, while, etc.

>Are you counting class and method definitions as statements?

     Aren't they?

>You can obviously fully quality. But what is the other error?  Do you
                         ^^^^^^^
     Eh?

>not consider import a statement?
>
>You can have a nested static class, but a nested inner class implies a
>link to the outer object, so it cannot be static.

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#29162

FromRoedy Green <see_website@mindprod.com.invalid>
Date2014-07-21 12:32 -0700
Message-ID<llqqs9llatvt1pa5ratakl5nsilft40p08@4ax.com>
In reply to#29161
On Mon, 21 Jul 2014 10:18:19 -0700, Gene Wirchenko <genew@telus.net>
wrote, quoted or indirectly quoted someone who said :

>>You can obviously fully quality. But what is the other error?  Do you
>                         ^^^^^^^
>     Eh?
 instead of import you can say java.lang.System.out.println( "ok" );
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Science is what we understand well enough to explain to a computer.
Art is everything else we do. 
~ Donald Ervin Knuth (born: 1938-01-10 age: 76)

[toc] | [prev] | [next] | [standalone]


#29185

FromArne Vajhøj <arne@vajhoej.dk>
Date2014-07-21 22:01 -0400
Message-ID<53cdc608$0$301$14726298@news.sunsite.dk>
In reply to#29162
On 7/21/2014 3:32 PM, Roedy Green wrote:
> On Mon, 21 Jul 2014 10:18:19 -0700, Gene Wirchenko <genew@telus.net>
> wrote, quoted or indirectly quoted someone who said :
>
>>> You can obviously fully quality. But what is the other error?  Do you
>>                          ^^^^^^^
>>      Eh?
>   instead of import you can say java.lang.System.out.println( "ok" );

qualify != quality

:-)

Arne

[toc] | [prev] | [next] | [standalone]


#29188

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2014-07-22 07:43 -0400
Message-ID<lqlip0$c39$1@dont-email.me>
In reply to#29185
On 7/21/2014 10:01 PM, Arne Vajhøj wrote:
> On 7/21/2014 3:32 PM, Roedy Green wrote:
>> On Mon, 21 Jul 2014 10:18:19 -0700, Gene Wirchenko <genew@telus.net>
>> wrote, quoted or indirectly quoted someone who said :
>>
>>>> You can obviously fully quality. But what is the other error?  Do you
>>>                          ^^^^^^^
>>>      Eh?
>>   instead of import you can say java.lang.System.out.println( "ok" );
>
> qualify != quality
>
> :-)

     Why would anyone use "import" with java.lang?

-- 
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#29194

From"Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org>
Date2014-07-22 14:08 +0100
Message-ID<99ydncWLpqCV_1POnZ2dnUVZ8r0AAAAA@bt.com>
In reply to#29188
Eric Sosman wrote:

>     Why would anyone use "import" with java.lang?

Sounds like a job interview question ;-)

    -- chris 

[toc] | [prev] | [next] | [standalone]


#29204

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2014-07-22 14:53 -0400
Message-ID<lqmc00$e2r$1@dont-email.me>
In reply to#29194
On 7/22/2014 9:18 AM, Stefan Ram wrote:
> "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> writes:
>> Eric Sosman wrote:
>>> Why would anyone use "import" with java.lang?
>> Sounds like a job interview question ;-)
>
>    String.java
>
> public final class String {}
>
>    Main.java
>
> import java.lang.String
>
> public final class Main
> { public static void main( final String[] args )
>                                   ^^^^^^
>    ...

     Fair 'nuff.  Allow me to rephrase: "Why would anyone with even
one tattered shred of sanity use `import' with java.lang?"

-- 
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#29239

FromRoedy Green <see_website@mindprod.com.invalid>
Date2014-07-23 09:44 -0700
Message-ID<uhpvs9111pfuq4q9ceuff9u3kl19s1oi3n@4ax.com>
In reply to#29204
On Tue, 22 Jul 2014 14:53:47 -0400, Eric Sosman
<esosman@comcast-dot-net.invalid> wrote, quoted or indirectly quoted
someone who said :

>one tattered shred of sanity use `import' with java.lang?"

import static java.lang.System.err;
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Science is what we understand well enough to explain to a computer.
Art is everything else we do. 
~ Donald Ervin Knuth (born: 1938-01-10 age: 76)

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web