Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-27-2011, 05:48 PM   PM User | #1
wales123
New to the CF scene

 
Join Date: Apr 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
wales123 is an unknown quantity at this point
Read text from a file and hold in an array

Hi Im trying to read lines from an external file and hold them in an array for future use using java.
I can read the file and print its contents but im not sure on the next step to hold the info in the array.

The information in the file looks similar to this
00001 1 3 2
00002 3 2 1

With first number is the number of a ballot paper and the next three numbers are ranks of three candidates by preference.

Any help much appreciated
wales123 is offline   Reply With Quote
Old 04-27-2011, 06:43 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Quote:
Originally Posted by wales123 View Post
Hi Im trying to read lines from an external file and hold them in an array for future use using java.
This is the JavaSCRIPT forum.

About the only similarity between Java and JavaSCRIPT are the first four letters of their names.

If you are really asking a JAVA question, you are in the wrong forum.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 04-27-2011, 06:57 PM   PM User | #3
wales123
New to the CF scene

 
Join Date: Apr 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
wales123 is an unknown quantity at this point
oops posted in the worng section.
Any chance it could be moved or ill start up another thread . . ?
wales123 is offline   Reply With Quote
Old 04-27-2011, 07:10 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
a mod will eventually move it, but it can take a while.

Just close this thread (mark it as RESOLVED using the "thread tools") and start a new one in Java forum.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 04-28-2011, 07:41 AM   PM User | #5
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,033
Thanks: 197
Thanked 2,410 Times in 2,388 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by Old Pedant View Post
a mod will eventually move it, but it can take a while.

Just close this thread (mark it as RESOLVED using the "thread tools") and start a new one in Java forum.
Why not PM a mod, or simply use the Report This Post link. I have done that for you.
Philip M is offline   Reply With Quote
Old 04-28-2011, 07:47 AM   PM User | #6
bullant
Banned

 
Join Date: Feb 2011
Posts: 2,699
Thanks: 13
Thanked 395 Times in 395 Posts
bullant is on a distinguished road
Whether you are using javascript or java, you can do what you want with AJAX if running the application from a browser

Last edited by bullant; 04-28-2011 at 07:50 AM..
bullant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:52 PM.


Advertisement
Log in to turn off these ads.