Java Year Current getCurrentYear()

Here you can find the source of getCurrentYear()

Description

Returns the current year from the system Calendar calendar .

License

Open Source License

Return

The current year as indicated by the system calendar .

Declaration

public static int getCurrentYear() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    /**/*from   w w  w.  j a  va2 s .c om*/
     * <p>
     * Returns the current year from the system {@link Calendar calendar}.
     * </p>
     * 
     * @return The current year as indicated by the system {@link Calendar
     *         calendar}.
     */
    public static int getCurrentYear() {
        int returnValue;

        returnValue = Calendar.getInstance().get(Calendar.YEAR);

        return returnValue;
    }
}

Related

  1. getCurrentYear()
  2. getCurrentYear()
  3. getCurrentYear()
  4. getCurrentYear()
  5. getCurrentYear()
  6. getCurrentYear()
  7. getCurrentYearFirst()
  8. getCurrentYearMonth()
  9. getCurrentYearMonthDay()