设计类

KiKi定义电子日历类

http://www.nowcoder.com/questionTerminal/e4c67097cdb242d9a3f38b7cfe839396

import java.util.*;
class TDate{
    private int year, month, day;
    TDate(int y, int m, int d){year = y; month = m; day = d;}
    @Override
    public String toString() {
        return day + "/" + month + "/" + year;
    }
}
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        System.out.println(new TDate(sc.nextInt(), sc.nextInt(), sc.nextInt()));
    }
}
全部评论

相关推荐

迷茫的大四🐶:你这个拿去投央国企吧,投私企包过不了的
点赞 评论 收藏
分享
Java面试先知:我也是和你一样的情况,hr 说等开奖就行了
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务