I need to generate a new Date object for credit card expiration date, I only have a month and a year, how can I generate a Date based on those two? I need the easiest way possib
You could use java.util.Calendar:
java.util.Calendar
Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.set(Calendar.MONTH, month); calendar.set(Calendar.YEAR, year); Date date = calendar.getTime();