🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Language puzzle

#7919
From: John McGrath [TeamB]
Date: Tue, 01 May 2001 22:18
27 lines
1274 bytes
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: <3aef3645_1@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,b65cd5c59c7b0e70,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-01 15:32:08 PST
From: "John McGrath  [TeamB]" <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Language puzzle
Date: Tue, 1 May 2001 18:18:45 -0400
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: 209.92.8.14
Message-ID: <3aef3645_1@dnews>
X-Trace: dnews 988755525 209.92.8.14 (1 May 2001 15:18:45 -0700)
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews