title: How do I convert a 4-digit julian date(yDDD) into a calendar date format like MM/dd/yyy using java?
body: <p>Input - Julian Date - "7107"
  Output - Calendar Date 
  I tried the following code</p>
  
  <pre><code>String julianDate = "7107";
  SimpleDateFormat fmt1 = new SimpleDateFormat("yDDD");
  Date date = fmt1.parse(julianDate);
  SimpleDateFormat fmt2 = new SimpleDateFormat("MM/dd/yyyy");
  String output = fmt2.format(date);
  System.out.println("Calendar Date : " + output); 
  </code></pre>
  
  <p>But getting wrong output as "Calendar Date : 04/17/0007"</p>
  
  <p>So since folks ask how that single "7" represent year. So even if I give "2017107" as input, representing "YYYYDDD" format . Even then I am getting wrong output.</p>
  
  <p>My expected output for "2017107" julian date is "04/17/2017" .But output is Calendar Date : 11/01/0048</p>
  
  <p>Used Java 7 version</p>