Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.javarush.test.level05.lesson12.home04;
- /* Вывести на экран сегодняшнюю дату
- Вывести на экран текущую дату в аналогичном виде "21 02 2014".
- */
- public class Solution
- {
- public static void main(String[] args)
- {
- Date d1 = new Date(25, "03", 2015);
- System.out.println(d1.day + " " + d1.month + " " + d1.year);
- }
- static class Date{
- int day;
- String month;
- int year;
- public Date(int day, String month, int year){
- this.day = day;
- this.month = month;
- this.year = year;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement