class week//注释单行
/*多行注释main函数可以保证类的独立运行
程序入口
会被程序调用
多行注释*/
/* 需求根据用户定义的数值,选择不同的星期
*/
{
public static void main(String[] args)
{int x=4 ;
if(x==1)
System.out.println("sunday");
else if(x==2)
System.out.println("monday");
else if(x==3)
System.out.println("tuesday");
else if(x==4)
System.out.println("wednesday");
else if(x==5)
System.out.println("thursday");
else if(x==6)
System.out.println("friday");
else if(x==7)
System.out.println("saturday");
else
System.out.println("输出错误");
}}
class switchweek
{public static void main(String[] args)
{int y=1;
switch(y)
{case 1:
System.out.println("sunday");
break;
default:
System.out.println("nono");
}
}
}
/*注解和调试程序*/