Android examples for java.util:Year
get Year as String from Calendar
//package com.java2s; import java.util.Calendar; public class Main { public static String getYear() { Calendar cal = Calendar.getInstance(); int year = cal.get(Calendar.YEAR); return String.valueOf(year); }/*from w w w. j a v a 2 s . c o m*/ }