Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,165,827 members, 7,862,724 topics. Date: Monday, 17 June 2024 at 02:18 AM

Codejava's Posts

Nairaland Forum / Codejava's Profile / Codejava's Posts

(1) (of 1 pages)

Programming / Re: Help On Java by codejava: 7:08am On Apr 05, 2011
Thanks segsalerty, I looked at your code is ok but i still have a challenge, 'am populating MySql db from text file. I quite can upload the data using buffer, but I made the amount column to be string, so i just want the module of the amount to be converted back to double rather than doing it manually b4 uploading. I still find it difficult to modified or apply your code.
Programming / Re: Help On Java by codejava: 5:57pm On Apr 04, 2011
can somebody help me to fine tone this code, i set it as string but i want to cast string to double, when storing those string:

String txt = null; String line = null;
ApplicationData app = new ApplicationData();
String[] splits = txt.split("\t"wink;
String amt = "0";
if (length > 3 && !splits[3].equals(""wink) {
amt = splits[3].trim();
amt = splits[3].replace('-',',').replace('"',',').replace('(',',').replace(')',',');
String actSplit[] = amt.split(","wink;
for(int z = 0; z < actSplit.length; z++){
      amount += actSplit[z];
    }
}
app.setAmount(amount);


my main concern is that, I want the values which i uploaded to return back in double. I think i can cast using Double.valueOf(amt); but is not working.
Kindly help pls
Certification And Training Adverts / Scjd Trainer by codejava: 3:12pm On Nov 03, 2010
If you can train somebody on Java Developer, try to contact me tru this email dotun.daniel@yahoo.com

(1) (of 1 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.