In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2026-05-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you Java based on the Calendar class output calendar code for the specified year and month how to write, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
The code is as follows
Package com.cyl.test3; import java.util.Calendar;import java.util.Scanner; public class RiLi {public static void main (String [] args) {int year= 2020; int month= 2; Calendar calendar = Calendar.getInstance (); / / since the month in Java starts counting from October, the real month December (month=12) needs to be subtracted by 1 to be December calendar.set (year,month-1,1) in Java; / / the first day of each month int weekday = calendar.get (Calendar.DAY_OF_WEEK)-1 System.out.println ("the first day of the month" + weekday); int maxDay = calendar.getActualMaximum (Calendar.DAY_OF_MONTH); System.out.println ("maximum days of the month" + maxDay); System.out.println ("\ t\ t" + year+ "year" + month+ "month"); System.out.println ("1\ t 2\ t 3\ t 4\ t 5\ t 6\ t day\ t"); int temp = 0; / / fill in the blanks for (int I = 0; I < weekday-1 For +) {System.out.print ("\ t"); temp++;} for (int I = 1; I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope




Editor to share with you how to use css to achieve watermark diffusion animation effect, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Wechat
About us
Contact us
Product review
car news
thenatureplanet
More Form oMedia:
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.