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


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

Re: A small quiz

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: A small quiz
Date Thu, 1 Oct 2015 08:24:22 -0400
Organization A noiseless patient Spider
Lines 22
Message-ID <muj8i2$iuj$2@dont-email.me> (permalink)
References <quiz-20151001125558@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Thu, 1 Oct 2015 12:22:26 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="19411"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5GUNbSvU8qLGVSC08U864"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
In-Reply-To <quiz-20151001125558@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:ygKpVRWHfv5r5HcnJzcL6pLue3U=
Xref csiph.com comp.lang.java.programmer:32746

Show key headers only | View raw


On 10/1/2015 8:02 AM, Stefan Ram wrote:
>    A method m() is declared to have a return type of java.lang.String:
>
> java.lang.String m()
>
>    . A programmer writes this expression:
>
> java.lang.String.valueOf( m() )
>
>    (The scope is so that »m« in the above expression refers to the
>    method »m()« as declared above.)
>
>    . Can you find out what might be a good reason the programmer might
>    have to write this expression? Since the return type of m() already
>    /is/ java.lang.String, the call to »java.lang.String.valueOf« seems
>    to be completely superfluous!

     Please don't use the N-word, Stefan.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

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


Thread

Re: A small quiz Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-01 08:24 -0400
  Re: A small quiz e.d.programmer@gmail.com - 2015-10-01 08:33 -0700
    Re: A small quiz Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-01 11:41 -0400
      Re: A small quiz Eric Douglas <e.d.programmer@gmail.com> - 2015-10-01 08:59 -0700
        Re: A small quiz Jeff Higgins <jeff@invalid.invalid> - 2015-10-01 12:49 -0400
        Re: A small quiz Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-01 13:02 -0400
          Re: A small quiz Eric Douglas <e.d.programmer@gmail.com> - 2015-10-01 10:19 -0700
            Thanks (Was: A small quiz) j4n bur53 <janburse@fastmail.fm> - 2015-10-02 00:12 +0200
            Re: A small quiz Mike Amling <mamling@chaff.us> - 2015-10-02 09:18 -0500

csiph-web