When I run the program it Prompts me to "Please enter the file name containing the the girls names." Then "Please enter the file name containing the the boy names." and nothing else happens but the code doesn't terminate
public static int getBoys(ArrayList<String> boysNames, Scanner s) throws IOException
{
//Getting boys file location
System.out.println("Please enter the file name containing the the boys names.");
String boyFileLocation=s.nextLine();
//Opening the file containing the names of boys
File boyFile = new File(boyFileLocation);
Scanner BF = new Scanner(boyFile);
int initialBoyCount=0;
while(BF.hasNext())
{
for (int i=0;i<boysNames.size();i++)
{
if(BF.nextLine()==boysNames.get(i))
{
}
else
{
boysNames.add(BF.nextLine());
}
}
}
return(initialBoyCount);
}