help im stuck.. we are to make two programs the 1st one we ask the user to input how many employees, 1st name, lastname, id,..then store it into a file called names.db. ...i was able to get this done...im stuck on the 2nd program...which suppose to do this....retrieve the employee database by asking the user to input the employees 1st name and if the employee is found then print that info...if not then print not found.
import java.util.Scanner;
import java.io.*;
public class RetrieveInfo
{
public static void main(String[] args) throws IOException
{
//create scanner object for keyboard input
Scanner keyboard = new Scanner(System.in);
//open file
File file = new File("Employee.db");
Scanner inputFile = new Scanner(file);
//ask for employee name
System.out.print("enter the name of the employee. ");
String firstName =keyboard.nextLine();
//here is where im stuck...read the file and check of the empoyee is
here. We are learning about loops some im pretty sure its going to be a loop
}
}