I have an assignment for class and I have to make a program that takes an existing file and converts all the letters to uppercase. Below is part of the code (specifically the loop):
// Read lines from the file until no more are left.
while (inputFile.hasNext())
{
// Read the next name.
String friendName = inputFile.nextLine();
// Need line to make all letters uppercase
}
System.out.print("Enter the saved file name: ");
String filename2 = keyboard.nextLine();
When I run it now: I am able to open the first text file and a second txt file is created, but there is no letters in the new file.