Brevity is the soul of wit. In the this task, let's celebrate brevity by doing the following: create a list, read 5 strings from the keyboard, add them to the list, find the shortest string, and then display it. If several strings are shortest, we'll display them all, each on a new line. Any questions, private?!
Expressing ourselves more concisely
- 5
Locked
Comments (16)
- Popular
- New
- Old
You must be signed in to leave a comment
Chloe
25 October 2021, 23:04
nailed it with 4 fori loops!
0
sreedhar s
9 May 2021, 09:59
I was using the below line to declare the list,
List<String> list = new ArrayList<>();
This makes the code verification failing. but surprisingly when I changed that line to below,
ArrayList<String> list = new ArrayList<>();
This makes the code verification pass!
This questions requirements needs to be corrected or the verification needs to be improved. Admins please look into this issue! Thanks :)
0
Roman
11 May 2021, 07:45
Since the lectures talk about ArrayList, then ArrayList is expected in the tasks)
0
ImDevin
19 April 2021, 03:52
Just leaving a remark, since the last comment was posted July of last year. I did it. Keep trucking everybody! :)
0
Nana
23 July 2020, 12:43
I have already asked the question in help and no one can tell me where my code went wrong.
0
Roman
24 July 2020, 06:05
You got an answer
0
Petros
21 July 2020, 03:07
Like the previous task. Good practice.
0
Dyrits
14 July 2020, 07:22
Why isn't it correct to declare the list of strings as a List?
+1
Ivan
28 June 2020, 16:07
what's the difference between List<String> and ArrayList<String>?
+1
Maryam Roudbari
9 May 2020, 08:39
i don't get it, why don't we indicate an ArrayList at first. why are we asked to define a List of Strings first and then initialize it with an ArrayList? Can anybody help me?
0
Sreekant
2 February 2020, 04:01
what is wrong my code.. it satisfies all conditions
0
Roman
3 February 2020, 08:00
Please refer to Help section at our course.
0
Lakshmanan Subramanian
31 October 2019, 00:25
Getting the output as expected, but it shows the requirements not satisfied. Please help to complete this task
0
Roman
31 October 2019, 07:29
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
0