programming-examples/java/_Basics/How to display name of a month in (MMM) format.java

11 lines
352 B
Java
Raw Normal View History

2019-11-15 12:59:38 +01:00
import java.util.Calendar;
import java.util.Formatter;
public class MainClass {
public static void main(String args[]) {
Formatter fmt = new Formatter();
Calendar cal = Calendar.getInstance();
fmt = new Formatter();
fmt.format("%tB %tb %tm", cal, cal, cal);
System.out.println(fmt);
}
}