title: Groovy: "def" keyword vs concrete type
body: <p>Should we or should we not define the datatype of a variable or return type of a method if we know the datatype and also it is not going to change at runtime? What are the pros and cons or using def vs actual datatype?</p>
  
  <p>One example being, if abc is intended to be <code>List&lt;String&gt;</code></p>
  
  <pre><code>List&lt;String&gt; abc = "xyz"; //IntelliJ IDEA gives syntax highlighting for improper assignment
  def abc = "xyz"; //IntelliJ IDEA will not give syntax highlighting
  </code></pre>