🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7925

Re: Language puzzle

#7925
From: Torsten Welches
Date: Wed, 02 May 2001 06:10
39 lines
1635 bytes
John,

did you do some Java certification lately? This is the kind of 
question you will see in the "Sun Certified Java Programmer"
exams... <g>

Torsten

"John McGrath  [TeamB]" <ng-b@JPMcGrath.net> wrote:
>Here is an interesting little language question:
>
>Are the following two methods equivalent?
>
>    String booleanString( boolean b ) {
>        String s;
>        if ( b ) {
>            s = "true";
>        } else {
>            s = "false";
>        }
>        return s;
>    }
>
>And:
>
>    String booleanString( boolean b ) {
>        String s;
>        if ( b ) s = "true";
>        if ( !b ) s = "false";
>        return s;
>    }
>
>--
>Regards,
>
>John McGrath  [TeamB]
>
>
Technical Details
Message-ID: <3aefa4c8$1_2@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3aef3645_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,b65cd5c59c7b0e70
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-01 23:13:38 PST
From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Sender: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Reply-To: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Subject: Re: Language puzzle
Newsgroups: borland.public.jbuilder.java.language
X-User-Info: 193.158.55.74 193.158.55.74    
References:  <3aef3645_1@dnews> 
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3aefa4c8$1_2@dnews>
Date: 1 May 2001 23:10:16 -0700
X-Trace: dnews 988783816 207.105.83.65 (1 May 2001 23:10:16 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews