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-18 14:44:36 +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);
}
}