title: How can I print out code that has indents to actually have the indents?
body: <p>I need to print out code, and have the indentation be correct but its all printing right at the beginning of the line.</p>
  
  <pre><code>public static void printData(Scanner fileScanner) {
  
          int lineNumber = 0;
  
          while (fileScanner.hasNextLine()) {
  
              System.out.println(lineNumber + ":    " + fileScanner.nextLine());
  
              lineNumber = lineNumber + 1;
          }
          System.out.println("\n" + "\n" + "Cross-Reference Index");
  </code></pre>
  
  <p>}</p>
  
  <p>This prints out all the code starting at the beginning of the line, but i'd like it to look formatted like actual code..</p>