Java Year Current year()

Here you can find the source of year()

Description

year

License

LGPL

Declaration

public static String year() 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.Calendar;

public class Main {
    public static String year() {
        Calendar cal = Calendar.getInstance();
        return String.valueOf(cal.get(Calendar.YEAR));
    }/*from   w  w  w .ja v  a2 s .  c  o  m*/
}

Related

  1. getYear()
  2. getYear()
  3. getYear()
  4. getYear()
  5. year()
  6. year()
  7. year()