Search:

Type: Posts; User: Norm

Search: Search took 0.30 seconds.

  1. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    How do you skip the first 10 magazines in a pile of magazines? Pick each one up and discard it.
    For lines in a file, read 10 lines and ignore them. You could use a loop
  2. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    No. You have to read and ignore/skip over everything you do not want to use.
    Just like if you had a pile of magazines and only wanted to read the one about fishing. You would have to look at each...
  3. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    You do not need a loop. You never use the variable s, you explicitly access the three elements of the array.
  4. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    Please explain what the problem with the code is now?
    What do you want different from what it is now doing?
    The 3 parts are each in a String.
  5. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    Does it do what you want?
  6. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    You need a regular expression expert for that.
    You want either a left paran or right paran as the delimiters. I don't know if the their order is important. What if the data was: first part) second...
  7. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    Does the '(' separate the first part from the second part and the ')' separate the second part from the third part?
  8. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    Is the pattern like this:
    <PART1> (<Part2>) <Part3>
    and you want to parse the String into those three parts?
    The String method indexOf would be very easy to use.
  9. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    That sounds like there is only one object and all the references in the arraylist point/refer to that one object. Be sure you create a new object to hold the new data before you put it into the...
  10. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    In C++ you could create many pointers that point to one object created with a new statement.
    Same in Java. Create the arraylist and save its address in a pointer. Pass that pointer to any method...
  11. Replies
    31
    Views
    3,233

    Re: Read Text File Into Strings

    If you only create ONE instance of an arraylist, you can pass references to that one instance to many different methods which can add and change entries in that one arraylist.
Results 1 to 11 of 11