Re: Reading data into an Array



<christopher_board@xxxxxxxxxxx> wrote in message
news:1183412146.507512.51230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The program has a text file stored somewhere on the computer which the
program will read. The file will have a long list of numbers inside
the file which may look something like this 49175630573014302316. The
file is read in once at the launch of the program. To save process
power of the computer I only want the file to be read in once. I
thought an Array would be best to do this but I am not sure as I am a
novice to java. I won't know how big the file is, it could be smaller
or larger. There will be a list box that will only display part of the
data for examble if the file reads something like 4917563057301430.
Then the list box will only display every other 2 numbers for example
in this example it would only show 17,30,30,30.

Sorry if this is not clear it is quite hard to explain what the
program is going to do the file.

Any help in what would be the best way in order to do this would
highly appreciated.

Thanks for any help that you can give me in this matter.

If this is all that the program does, then I'd forget about the array
altogether, and just read the file, character by character, and store
every other pair of characters in the listbox.

- Oliver


.



Relevant Pages

  • Re: Need help with textboxes
    ... character into the input box. ... one of assigning the reference to a variable: ... All forms and their children are stored in an array ... No. Bracket property accessors allow their argument to be any string value. ...
    (comp.lang.javascript)
  • Help in Spanish translation of the description of UDFs
    ... functions of minimum / maximum values among elements of an array column. ... GETALLWORDS- Inserts the words from a string into a global dimensioned ... WORDTRAN- Searches a character string for occurrences of a first word, ... ARRAYSUM- Returns the sum of all or a specified range of numeric (and/or ...
    (microsoft.public.fox.helpwanted)
  • Re: Pointer
    ... require in input a pointer char: ... unsafe public static extern int OpenFile; ... What is it pointing to exactly, is it pointing to a "Unicode character" array or is it pointing to a "Single byte character" array or is it pointing to something else? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Pointer
    ... require in input a pointer char: ... unsafe public static extern int OpenFile; ... What is it pointing to exactly, is it pointing to a "Unicode character" array or is it ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: problem with unhandled exception (acces violation) and undefined array/pointer
    ... If you pass a real array to a ... character dummy the extra arguments won't be there. ... occasional fortran user with limited knowledge, ... with compile and link options, ...
    (comp.lang.fortran)