Java Year Get getYear()

Here you can find the source of getYear()

Description

get Year

License

Open Source License

Declaration

public static String getYear() 

Method Source Code

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

import java.util.*;

public class Main {
    public static String getYear() {
        GregorianCalendar calendar = new GregorianCalendar();
        String year = new Integer(calendar.get(GregorianCalendar.YEAR)).toString();
        return year;
    }/*  ww w. java  2 s  .  c  o m*/
}

Related

  1. getYear()
  2. getYear()
  3. getYear()
  4. getYear()
  5. getYear()
  6. getYear()
  7. getYear()
  8. getYear(Date d)
  9. getYear(Date date)