I want to read an entire file into a string. The file however is in the program arguments. I have been trying to use Scanner in order to:
Scanner scan = new Scanner(args[0]);  
        scan.useDelimiter("\\Z");  
        String content = scan.next(); 
        System.out.println(content);
My result is just the name of the file that is in "args[0]" instead of the actual contents of the file.
I figured a loop would not work since I am not hardcoding the file into the program.
 
    