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
Loading

VulpesRank #55 · 29.2K reputationPosted Feb 21, 2012, 6:43 AM EST
Prime bRank #2,035 · 712 reputationPosted Feb 21, 2012, 11:22 AM EST
VulpesRank #55 · 29.2K reputationPosted Feb 21, 2012, 1:48 PM EST