Article View: aus.computers.java
Article #1112Re: help - Whats wrong with my codes...?
From: Dion Gillard
Date: Sat, 24 Jul 1999 00:00
Date: Sat, 24 Jul 1999 00:00
26 lines
1447 bytes
1447 bytes
[This followup was posted to aus.computers.java and a copy was sent to the cited author.] In article <7n275a$jh3$1@enyo.uwa.edu.au>, khaireel@tartarus.uwa.edu.au says... | I cant seem to compile the following codes. It works okay when I use the | Integer type, but when I need to use the Float, it simply refuses to | compile - and dumb as I am, I dont seem to know the problem. | | | float pn; | int n; | int i; | | pn = Float.valueOf(txtFld1.getText()); <<=== This is the line with | problem... | n = Integer.parseInt(txtFld3.getText()); | | | Er.. do I need to declare something else before...? Please help. RTFM....Float.valueOf() returns a Float (not the capital F). You have declared fn as a flow (not the lower f). try this: pn = Float.valueOf(txtFld1.getText()).floatValue(); dIon
Technical Details
Message-ID:
<MPG.1203b66a6f3116d99896b2@news.ozemail.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7n275a$jh3$1@enyo.uwa.edu.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,efb279fdc6cd6dc4 X-Google-Attributes: gid10d6db,public From: dion@multitask.com.au (Dion Gillard) Subject: Re: help - Whats wrong with my codes...? Date: 1999/07/24 Message-ID: <MPG.1203b66a6f3116d99896b2@news.ozemail.com.au> X-Deja-AN: 504594892 Distribution: world References: <7n275a$jh3$1@enyo.uwa.edu.au> X-Trace: ozemail.com.au 932776941 210.84.6.245 (Sat, 24 Jul 1999 10:42:21 EST) Organization: Multitask Consulting NNTP-Posting-Date: Sat, 24 Jul 1999 10:42:21 EST Newsgroups: aus.computers.java