Regarding adding the statements at console
<p>I have developed a Java program that will count the number of files in the folder. There may be Java files or text files, of which it will count the number of lines of code. The idea is to print the file name to the console, followed by the line count. This part is done, shown below:</p>

<pre><code>public class FileCountLine {    
    public static void main(String[] args) throws FileNotFoundException {
    Map&lt;String, Integer&gt; result = new HashMap&lt;String, Integer&gt;();
        File directory = new File("C:/Test/");
        File[] files = directory.listFiles();
        for (File file : files) {
            if (file.isFile()) {
                Scanner scanner = new Scanner(new FileReader(file));
                int lineCount = 0;
                try {
                    for (lineCount = 0; scanner.nextLine() != null; lineCount++);
                } catch (NoSuchElementException e) {
                    result.put(file.getName(), lineCount);
                }
            }}
        for( Map.Entry&lt;String, Integer&gt; entry:result.entrySet()){
              System.out.println(entry.getKey()+" ==&gt; "+entry.getValue());
            }       
    }}
</code></pre>

<p>Right now I have hard coded the location of the directory like this:</p>

<pre><code>File directory = new File("C:/Test/");
</code></pre>

<p>I want this to be more interactive, and prompt the user to enter the location into console. After the user presses Enter, it will do the rest of the functionality as is.</p>
