title: Anomaly in hardcoding date in Java
body: <p>There is an anomaly I have observed while setting dates in Java.</p>
  
  <p>I am trying the following:-</p>
  
  <pre><code>Date date1 = new Date("10/12/2018");
  </code></pre>
  
  <p>So when I am printing the date, it is coming of future
  It was printing this date:- 14 June 2019.</p>
  
  <p>When I am doing the following:- </p>
  
  <pre><code>Date date1 = new SimpleDateFormat("dd/MM/yyyy").parse("10/12/2018");
  </code></pre>
  
  <p>It is showing the exact date. Can anyone please explain why this happened?
  Thanks in advance.</p>