3
Answers

Read every othe chat in the file

Prime b

Prime b

13y
1.4k
1
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
Answers (3)