Java Year Current 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;

import java.util.Calendar;

public class Main {

    public static String getYear() {
        Calendar CD = Calendar.getInstance();
        int YY = CD.get(Calendar.YEAR);
        StringBuffer curDateString = new StringBuffer();
        curDateString.append(YY);//w w  w.  jav a 2  s.co  m
        return curDateString.toString();
    }
}

Related

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