Let's just start by saying that i'm somewhat of a newbie to the java language.

Okay, what I want to do is have an EOF loop, and in that loop, i want to read 3 lines of data from a file at a time and assign their values to variables. Also, and this is where my problem lies, the first of the three lines is a name, and the other two are possibly pay rate and current hours worked or something arbitrary like that. I would like to use the name to declare an object of type, let's say Employee, with their name.

for instance i would like to have a way to read the name Bob and then do this: Employee Bob;
Then i want to instantiate that object like this: Bob = new Employee(line2, line3); where line 2 and 3 are the pay rate and hours worked.

I'm pretty sure there's no built in way to do that, but can someone help me get around that?