title: What is the main difference between 'void method' and 'return type method' in Java?
body: <pre><code>public void printString(String str) {
      System.out.println(str);
  }
  
  public String stringMethod(String str) {
      return str;
  }
  </code></pre>
  
  <p>I have write the code with two methods, one is void (print the string message) and second is return the String. So those two are the almost same, the difference is just return statement in String method. Can anybody explain those two with real life examples?</p>