title: Passing System.out.println(); as an argument in a method
body: <p>I want to pass <code>System.out.println();</code> as an argument but the compiler won't allow me to return a void type as an argument. here is what I want it for.</p>
  
  <pre><code>public class Array {
  
      public static void main(String args[]) {
          a(data());
      }
  
      static void a(e) {
          System.out.println(e);
      }
  
      static void data() {
          ...
      }
  }
  </code></pre>
  
  <p>So What is want <code>a(data());</code> to look like after it is compiled is something like this.</p>
  
  <pre><code>a(data()) = System.out.println(data(){...});
  </code></pre>
  
  <p>Eventually I want to shorthand <code>System.out.println()</code>.</p>