🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #329

Re: help with converting a double to an integer

#329
From: Benjamin Johnston
Date: Fri, 20 Oct 2000 00:00
14 lines
1098 bytes
> I have a Double Variable A which I need converted to an integer...
> ive tried to use intValue() which is part of the double class
> but I dont think im gettin the syntax right
> ne help would b appreciated

This probably summarizes everything...

Integer converted = new Integer(new Double(3.5).intValue());

int converted2 = (int)3.5;


-Benjamin Johnston
s355171@student.uq.edu.au
Technical Details
Message-ID: <Pine.OSF.4.21.0010201717090.30183-100000@student.uq.edu.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <PuRH5.1953$SF5.40732@ozemail.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,3eb22abec8262eb3
X-Google-Attributes: gid10d6db,public
From: Benjamin Johnston <s355171@student.uq.edu.au>
Subject: Re: help with converting a double to an integer
Date: 2000/10/20
Message-ID: <Pine.OSF.4.21.0010201717090.30183-100000@student.uq.edu.au>
X-Deja-AN: 683702223
References: <PuRH5.1953$SF5.40732@ozemail.com.au>
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@uq.edu.au
X-Trace: bunyip.cc.uq.edu.au 972026580 24145 130.102.2.20 (20 Oct 2000 07:23:00 GMT)
Organization: University of Queensland
Mime-Version: 1.0
NNTP-Posting-Date: 20 Oct 2000 07:23:00 GMT
Newsgroups: aus.computers.java