title: Convert String to Calendar Object in Java
body: <p>I am new to Java, usually work with PHP.</p>
  
  <p>I am trying to convert this string:</p>
  
  <blockquote>
    <p>Mon Mar 14 16:02:37 GMT 2011</p>
  </blockquote>
  
  <p>Into a Calendar Object so that I can easily pull the Year and Month like this:</p>
  
  <pre><code>String yearAndMonth = cal.get(Calendar.YEAR)+cal.get(Calendar.MONTH);
  </code></pre>
  
  <p>Would it be a bad idea to parse it manually? Using a substring method?</p>
  
  <p>Any advice would help thanks!</p>