title: Calling Java class/method using command line
body: <p>I want to write a Java program so that I can call it using the command-line, something like</p>
  
  <blockquote>
    <p>java hearts/NewDeck | java hearts/Shuffle</p>
  </blockquote>
  
  <p>which involves passing the output of the first command as the input of the second command. How should I structure the program? Should NewDeck/Shuffle be classes or methods?</p>