Is there any direct way to set a date to a variable but as an input?
I mean that i don't know the date at design time, the user should give it.
I tried the following code but it doesn't work:
Calendar myDate=new GregorianCalendar(int year, int month , int day);
Java – How to set a date as input in java
calendardategregorian-calendarjava
Best Answer
Try the following code. I am parsing the entered String to make a Date