hello everyone i am stuck with my code i can read in one line of my code but i want to be able to test if i have reached the end of my line or not and when i have i want to be able to read in the next line and also just say the first line of the file has 10 tokens so i need to have 10 get methods is there a way in which i can change the amount of get methods to be exact with the amount of tokens for example ben,dave,jim,lee,simon,cris,claire,lauren,frances,alex now i want 10 get() methods but if the line has 12 tokens i want the get method to change automatcally to 12 get methods is this possible my code is below thanks jason import java.io.*; import java.util.*; import java.lang.*; import java.util.StringTokenizer.*;
public class RT2 {
public static void main(String[] args) { String cT = null; String lT = null; try { boolean eol = false; Vector v2 = new Vector(100); Vector v = new Vector(100); FileReader file = new FileReader("Work.txt"); BufferedReader buff = new BufferedReader(file); String line = buff.readLine(); StringTokenizer s = null; boolean eof = false; while (!eof){ s = new StringTokenizer(line.trim(),",",true); while (s.hasMoreTokens()) { cT = s.nextToken(); if (cT.equals(",") && lT.equals(",")){ v.add(""); } else if (!cT.equals(",")) { v.add(cT); } lT = cT;