Can anyone tell me how to read a file (entered as a command line arg.)using the string tokenizer and pass thoses values that were read to a constructor?? Please see my example code:
FileReader theFile;
BufferedReader fileIn = null;
String Currenttoken;
Mortgage m;
\\ I have a clas called Mortgage i need to use
public static void statFile( String fileName )
{
try
{
theFile = new FileReader( fileName );
fileIn = new BufferedReader( theFile );
StringTokenizer st = new StringTokenizer(fileIn);
while (st.hasMoreTokens())
{
m = new Mortgage(theFile);
}
FileReader theFile;
BufferedReader fileIn = null;
String Currenttoken;
Mortgage m;
\\ I have a clas called Mortgage i need to use
public static void statFile( String fileName )
{
try
{
theFile = new FileReader( fileName );
fileIn = new BufferedReader( theFile );
StringTokenizer st = new StringTokenizer(fileIn);
while (st.hasMoreTokens())
{
m = new Mortgage(theFile);
}