Java Year Current currentYear()

Here you can find the source of currentYear()

Description

Returns the current time of the system

License

Open Source License

Declaration

public static int currentYear() 

Method Source Code

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

import java.util.Calendar;

public class Main {
    /** Returns the current time of the system */
    public static int currentYear() {

        Calendar cal = Calendar.getInstance();
        int year = cal.get(Calendar.YEAR);
        return year;

    }//from   ww w  . j  a v  a2s. c o m
}

Related

  1. currentDayForYear(long selectTime)
  2. currentYear()
  3. currentYear()
  4. getCurMonthDayNumber(String strYear, String strMonth)
  5. getCurrentYear()
  6. getCurrentYear()