This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I too tried u'r problem.I got the same result as that of you.I think the problem is u'r reading the input from keyboard and then u'r pressing enter.Then it's taking both input+ascii value of enter(48).So there is no output.Just add the following 2 lines after reading input System.out.println(month); month=month-48;
Joined: Apr 21, 2006
Paul, thanks I will be checking into that, because I remember now reading about how it reads in bytes not characters.. I just learned getting input and switch, so I am going to stud a little more and see what I find..
Aparna, that code works up to number 9, then anything with a one in it shows January.. maybe you can't use too many cases in switch or something..