I need to read a file into a string so I can scramble to words of the file. Right now I have:
Scanner infile = new Scanner( new FileReader( args[0] ) );
String text = infile.nextLine();
This works properly as it reads the first sentence from the file, but it only reads the first line. How do I make it so it reads the whole paragraph in the file????
I would appreciate any help. Thanks