Suitable for people :java beginner , getting started

New contact java, Learning branch structure if and switch 
package com.ambow.www.ch03; import java.util.Scanner; public class Day {
public static void main(String[] args) { Scanner sc = new Scanner(System.in);
System.out.print(" Please enter the year "); int year = sc.nextInt(); System.out.print(" Please enter month ");
int month = sc.nextInt(); if(month<0 || month>12 || year<0) {
System.out.println(" Please enter the legal month and year !"); }else { switch(month) { case 1: case 3: case
5: case 7: case 8: case 10: case 12:System.out.println("31 day ");break; case 4:
case 6: case 9: case 11:System.out.println("30 day ");break; }
if((year%100!=0&&year%4==0)||year%400==0) { if(month==2) {
System.out.println("29 day "); } }else { if(month==2) { System.out.println("28 day ");
} } } } }
 

Technology
©2019-2020 Toolsou All rights reserved,
How to prevent Mac put to sleep ? Tell you 4 This is an effective way be based on C# Students' grades / mis solve element-ui The drop-down box of has a value but cannot be selected Student information management system source code -C language VR,AR and MR The difference between these technologies 【 Data structure and algorithm 6】 Stack implementation of comprehensive calculator utilize python Yes monkey Automatic log analysis Laya Wechat games sub package loading Alibaba enterprise email smtp set up ( practice )【Java Details of knowledge points 3】 Serializable and Deserialize