KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
According to the Java API, the constructor Date(year, month, day) is deprecated. I know that I can replace it with the following code: Calendar myCal = Calendar.getInstance(); myCal.set(Calendar.YEAR, theYear); myCal.set(Calendar.MONTH, theMonth); myCal.set(Calendar.DAY_OF_MONTH, theDay); Date theDate = myCal.getTime(); However, I would like something shorter to replace it with (ideally one to two lines).
Tags (comma-separated)
Save Edits
Cancel