I have an object with a method that reads a file and for each line that is read, it parses the data into an object.
For example:
public class test{
private void processData{
while((input = bf.readLine()) != null){
test t = new test();
}
}
}
Is it correct to do that in a method rather than the main method? Why or why not?