I'm not sure what you expect that code to do. Perhaps an SSCCE, or at least some comments, would help us understand it?
Type: Posts; User: KevinWorkman
I'm not sure what you expect that code to do. Perhaps an SSCCE, or at least some comments, would help us understand it?
Well, how do you do this by hand or in your head? Pretend you have a friend who has never seen a calendar before. Write out instructions that he could follow to do the task, and you'll have an...
What do you want to happen? Do you want to throw an Exception? Then throw one from the constructor. Do you want to show an error message? If so, check the input before you even call the constructor....
Norm has answered these questions. For the time, check out the API for System, or Calendar, or Date. Or do some googling. If something you see confuses you, create an SSCCE that tests it out and post...