Read every othe chat in the file
                            
                         
                        
                     
                 
                
                    Prompt the user for and store the file name (usernamesandpasswords.txt) of the attached file. On a new line for each, display back to the user every other character in the file name starting with the first character (u).
What i have done
  while (inputFile.hasNext())
        {
            line = inputFile.nextLine();
            for (int index = 0; index < line.length(); index+=2)
            {
                if (line.charAt(index) == character)
                {
                    System.out.println(line.charAt(index));
                }
            }
It doesnt work though