title: Scala methods with no arguments
body: <p>In Scala there are two ways to define a method which takes no argument</p>
  
  <pre><code>    1 def a=println("hello")
  
      2 def a()=println("hello")
  </code></pre>
  
  <p>These two methods are exactly same but (2) can be called with and without parentheses.</p>
  
  <p>Is there any special reason for which this feature is allowed in Scala.It confuses me which to use and when?</p>