10 Replies Latest reply on Mar 30, 2007 12:20 PM by 800282

    splitting strings

      i have a list of information e.g.

      junction blue2
      segment UniversityDrive University blue2 0.3 10
      segment BluebellRd2 blue1 blue2 0.11 20
      segment BluebellRd3 blue2 blue3 0.42 20
      busline Line25 University blue2 blue3 colman2 Unthank
      busline Line26 University blue2 blue1 colman1 roundabout Earlham

      i want to be able to take certain information from certain lines e.g.
      i need all of the first line, only the second and third words of lines two, three and four.

      i was thinking of splitting the lines into tokens, then using the system.out.println to print them.

      is this a good way, hows could i do this?