Pallavi,
StringTokenizer is part of the java.util.* class; you need to import java.util.*;
The code below compiles and runs...
import java.io.*;
import java.util.*;
public class Employee2 {
public static void main(String args[]) throws IOException {
try {
FileReader fr = new FileReader("filename.txt"); //creating a File Reader Object
BufferedReader br = new BufferedReader(fr);
while(br.ready()) {
String line = br.readLine();
StringTokenizer st = new StringTokenizer(line, ":");//creating a System Tokenizer.
int SSn = Integer.parseInt(st.nextToken().trim());//get the SSn part
String firstname = st.nextToken().trim();//get the firstname part
String lastname = st.nextToken().trim();//get the lastname part
System.out.println("SSN=" + SSn + " Fname=" + firstname + " Lname=" + lastname);
}//~while(br.ready())...
br.close();
}//~...
catch(Exception e) {
System.out.print("Error now");
}
}//~public static void main(...
}//~public class Employee2...