public int yearWorked(){ int totalWorked = GregorianCalendar.getInstance(YEAR) - this.hiringDate.get(Calendar.YEAR); // is this logic correct ? return totalWorked; }
hiringDate.get
GregorianCalendar today = new GregorianCalendar(); int totalWorked = today.get(Calendar.YEAR) - hiringDate.get(Calendar.YEAR);
hiringDate
GregorianCalendar
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)