🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: null value

#8773
From: Torsten Welches
Date: Sat, 03 Mar 2001 08:33
37 lines
1563 bytes
oops, I hit the Send button too soon:

>Simply check for the value zero:

if (RMBSum==0) {
...
}

Torsten

Torsten Welches schrieb in Nachricht <3aa0ac15$1_2@dnews>...
>Stephen,
>
>int is a primitive datatype, not a class. Only class types (references) can
>have the special value null which is meant to be a "reference to nothing".
>Simply check for the value zero:
>
>stephen schrieb in Nachricht <3aa09b70_2@dnews>...
>>How to get a int value and how to check if it is null?
>>
>>int RMBSum=Integer.parseInt(getParameter("RMBSum"));
>>
>>if ((RMBSum==null) && (RMBSum.intValue()==0))
>>   System.out.println("RMBSum null");
>>else
>>   System.out.println(RMBSum);
>>
>>Thanks
>>Stephen
>>
>>
>>
>>
>>
>>
>
>
Technical Details
Message-ID: <3aa0ad1c_1@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!194.8.205.227
References: <3aa09b70_2@dnews> <3aa0ac15$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,1174403afea3aa39
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-03 00:42:05 PST
From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Newsgroups: borland.public.jbuilder.java.language
References: <3aa09b70_2@dnews> <3aa0ac15$1_2@dnews>
Subject: Re: null value
Date: Sat, 3 Mar 2001 09:33:15 +0100
Lines: 39
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 194.8.205.227
Message-ID: <3aa0ad1c_1@dnews>
X-Trace: 3 Mar 2001 00:36:44 -0800, 194.8.205.227
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!194.8.205.227