A name is a name

  • 2
At the age of 80, Yurgona Dye fulfilled his dream and learned to program. But he encountered two problems: first, nobody would hire him as a junior developer because of his age; and second, people were afraid to associate with him because of his name. But Yurgona is now a programmer. He can write a method that will assign him any name and birth year. Can you?
You can't complete this task, because you're not signed in.
Comments (19)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Lex Icon Level 17, Sofia, Bulgaria
30 September 2020, 12:55
SUPPORT: please, correct the expected output in the task, which is: My name is Kevin. I was born on 15/2/1988 The correct output must be: My name is Kevin. I was born on 2/15/1988 I've been spending 5-6 attempts before founding this mistake.
Edddieg Level 15, Providence, United States
13 June 2020, 05:23
-guys there is a catch here -the input data is name year month day -you should set your keyboard reader as such
Sean Nigito Level 6, Newark, United States
12 August 2020, 16:06
thanks for the tip!
mastere Level 9, Rochester, United States
6 November 2020, 14:49
I got it wrong the first time for that reason I had the month and day swapped for input reader.
ben Level 8, Basingstoke, United Kingdom
1 March 2020, 17:52
so why does this fail "The program should display text in accordance with the template specified in the task" criteria?
import java.util.Scanner;

public class Solution {
    public static void main(String[] args) throws Exception {
        //write your code here
        Scanner scan = new Scanner(System.in);
        String name = scan.nextLine();
        int birthYear = scan.nextInt();
        int birthMonth = scan.nextInt();
        int birthDay = scan.nextInt();


        System.out.println("My name is " + name.substring(0, 1).toUpperCase() + name.substring(1) + ".");
        System.out.println("I was born on " + birthMonth + "/" + birthDay + "/" + birthYear);
    }
}
Manish Sinha Level 26, london, United Kingdom
12 March 2020, 14:22
have you solved this task? you are already on level 8 . great work .
stambul Level 11, Ukraine
4 October 2019, 13:15
five attempts because I entered "\" and not "/".
Laura Level 7, Lübeck, Deutschland
4 September 2020, 13:12
Oh that sucks.
Abu Level 15, Irving, United States
11 September 2019, 15:26
Be careful of "." (fullstop) after the name
K SHAKTHI DHAR REDDY Level 5, Chennai, India
3 July 2019, 10:24
can someone pls help
K SHAKTHI DHAR REDDY Level 5, Chennai, India
3 July 2019, 10:24
I don't understand whats wrong in this typing
Narra Geetha Level 5, Hyderabad, India
8 June 2019, 15:04
can anyone please help me with typo error
Zserbo Level 22, Budapest, Hungary
8 June 2019, 15:50
There is a dot at the end of the first line. That was my struggle
megha priya Level 9, Delhi, India
4 June 2019, 05:33
I a not resolve the typo error.
Jerzy Rojek Level 11, Katowice, Poland
31 May 2019, 11:20
Oh you Americans and your illogical date format
mastere Level 9, Rochester, United States
6 November 2020, 15:06
American people started doing that long time ago because it was often confused in the format (day/month/year) because people would get the day and month (6/12/2020) confused unless the full month name was written out as in (06/November/2020) Since in Europe some people also used the format (year/month/day) and the problem was that the day or year and month could both be written with one or two digits and the year was often abbreviated to two digits rather than four. With two possible formats in Europe at the time American people started writing out the full month name and found it more convenient to place this full written name before the one or two digit day and four digit year (November/06/2020) generally in writing rather than slashes / the year and day would be separated with a comma , (November 6, 2020) This became the preferred way to do things in the United States of America for whatever reason and eventually it became common to revert to a numbered month format for brevity once again. It may seem illogical if you are from somewhere that uses a different format, but different date formats are used all around the world. The most common globally is (Day/Month/Year) however both (Month/Day/Year) and (Year/Month/Day) are also used in many countries around the world. Your country says Poland and I think Poland generally uses the (Day/Month/Year) format. Canada is the only country I have known to make common use of all three formats with little regard to consistency although there are probably others.