0% found this document useful (0 votes)
21 views1 page

Java Programs

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Java Programs

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

import java.util.

Calendar;

public class Demo {

public static void main(String[] args) {

Calendar calendar = Calendar.getInstance();

String[] month = new String[] {"January", "February", "March", "April", "May", "June", "July",
"August","September", "October", "November", "December" };

System.out.println("Current Month = " + month[calendar.get(Calendar.MONTH)]);

OUTPUT

Current Month = July

You might also like