编一个自己生日那个月日历的JAVA 帮忙修改下顺便看下哪里错了 我是新手 求大神帮忙
要求第一行名第二行姓第三行生日第四行空白第五行开始日历,求大神帮忙修改错误。。。publicclassAssignment1{publicstaticvoidmain(S...
要求第一行名 第二行姓 第三行生日 第四行空白 第五行开始日历,求大神帮忙修改错误。。。
public class Assignment1
{
public static void main (String[] args)
{
System.out.println("My first name is Ruo");
System.out.println("My last name is Zha");
System.out.println("My birthday is 08/08/94");
System.out.print("\t");
}
}
}
August 1994
SU M T W TH F SA
---- ---- ---- ---- ---- ---- ----
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
这是完整作业 求解答Use the println and print methods and show the information in the following format.
1. The first and second lines print the first name and last name (3 pts).
2. The third line shows the birthday and year with double- quotations (") (3 pts).
3. The forth line is a blank line (3 pts).
4. From the fifth line, display the calendar of your birthday month (3 pts). Use "\t" to set the alignments for each day of week as shown in the example below (3 pts for alignments). 展开
public class Assignment1
{
public static void main (String[] args)
{
System.out.println("My first name is Ruo");
System.out.println("My last name is Zha");
System.out.println("My birthday is 08/08/94");
System.out.print("\t");
}
}
}
August 1994
SU M T W TH F SA
---- ---- ---- ---- ---- ---- ----
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
这是完整作业 求解答Use the println and print methods and show the information in the following format.
1. The first and second lines print the first name and last name (3 pts).
2. The third line shows the birthday and year with double- quotations (") (3 pts).
3. The forth line is a blank line (3 pts).
4. From the fifth line, display the calendar of your birthday month (3 pts). Use "\t" to set the alignments for each day of week as shown in the example below (3 pts for alignments). 展开
2014-09-05 · 知道合伙人软件行家
关注
展开全部
给你看效果
直接给你上代码吧
public static void main(String[] args) throws IOException {
System.out.println("名");
System.out.println("姓");
System.out.println("生日");
System.out.println(); //空格
System.out.println("SU\tM\tT\tW\tTH\tF\tSA");
for(int i=0; i<7; i++){
System.out.print("----\t");
}
System.out.println("");
for(int i=1; i<=31; i++){
System.out.print(i + "\t");
if(i % 7 == 0){
System.out.println();
}
}
}
更多追问追答
追问
throws IOException 这个是什么。。。
追答
throws IOException 声明某个方法抛出一个IOException异常
调用方法处要么捕获异常,要么重抛
这个只是我的方法里写的,你去掉就好了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询