Java Year Current getCurrentYear()

Here you can find the source of getCurrentYear()

Description

get Current Year

License

Open Source License

Return

currentYear indicates the the actual year

Declaration

public static int getCurrentYear() 

Method Source Code

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

import java.util.Calendar;
import java.util.Date;

public class Main {
    /**//from  w  w w  .j  ava2  s  .c o  m
     * @return currentYear indicates the the actual year
     */
    public static int getCurrentYear() {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());
        return cal.get(Calendar.YEAR);
    }
}

Related

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