Text Editor Help!?!
**Hey! I'm really new to Java, so pls no hate or super complicated junk xD** Anyways, I've been making a text editor using an array. It looks like this. import static java.lang.System.*; import java.io.IOException; import java.util.NoSuchElementException; import java.util.Scanner; public class Activate { public static void main(String[] args) throws NoSuchElementException,IOException { String words[] = new String[5]; for(int i = 0; i < 5; i++) { words[i] = ""; } //while(true) { for(int i = 0; i < 5; i++) { out.print("> "); out.println(words[i]); } Scanner reader = new Scanner(in); out.print("Which line to replace? (1-5) "); int number = reader.nextInt(); reader.nextLine(); out.print("What to replace with: "); String repl = reader.nextLine(); words[number - 1] = repl; reader.close(); //} } } I want it to go back to the beginning of the main method like the first run, but the while loop (commented out) throws an error I can't seem to get rid of. Any help on this would be GREATLY appreciated. Thanks!!