How do I print out a calendar month in console?
<p>I have an assignment for a class I'm taking in which I have to make a Java console application, and it involves asking the user for a date, parsing that date, and working out what day of the month that date starts on.  I have to then print out a calendar to look like this:</p>

<pre class="lang-none prettyprint-override"><code>Calendar for September 2016
Su  Mo  Tu  We  Th  Fr  Sa
-   -   -   -   1   2   3   
4   5   6   7   8   9   10  
11  12  13  14  15  16  17  
18  19  20  21  22  23  24  
25  26  27  28  29  30  -
</code></pre>

<p>I have the date, I have the number of the day that the date starts on, (eg. Day= 1 (Monday), Day= 2(Tuesday), etc.)</p>

<p>Now, I can use a very messy looking switch statement with nested if statements that says, depending on the value of Day, and the number of days in that month, print out this pre-made calendar, and I can just pre-make a calendar for every eventual combination of Day and number of days in that month.  But I don't want to do that, and I can't figure out an easier way of doing it.  Has anybody got any ideas of a tidier, more succinct way of doing it?  Would it be something involving 2d arrays?</p>

<p>PS.  I'm not allowed to use any date-based library classes available in Java.</p>