CodeGym /Courses /Java Syntax /Final tasks

Final tasks

Java Syntax
Level 9 , Lesson 11
Available

"Hey, Amigo!"

"Hello, Captain Squirrels!"

"Congrats on completing the level. Before you move beyond, be sure to complete these coding tasks."

Comments (48)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Anonymous #10960894 Level 19, Arnold, United Kingdom
1 April 2022
In what way is 'Watermellon', 'Bob', 'Cherry', 'Apple' a sorted list of words? It is not alphabetical by start letter, it is not by string size either, yet it is used as an example of correct output for the last task?
lakhenaleng Level 24, Australia
19 April 2022
I believe the example output is incorrect - it should be: Apple 22 Bob 3 Cherry 1 0 Watermelon This output passed validation for me. The words are being sorted with the String.compareTo method, which compares the strings based on the Unicode values of each of their characters. You can ctrl + left click on the methods in intelliJ to navigate to the method declaration and read more about its implementation.
Anonymous #10853261 Level 1, Queens: git commit -m 'get the money', United States
6 December 2021
Note that on the task "List of number arrays", you need to add "import java.util.Arrays;" in order for the program to compile correctly because of the existing code in the printList method.
Sean Level 11, Manchester, United States
19 August 2021
Hey "The code won't compile".... that was a mean ';' you dropped in there.
DarthGizka Level 24, Wittenberg, Germany
30 May 2021
task0919 (Dividing by zero) caveat: requirement 6 (The program should display the stack trace of the caught exception.) can only be met by calling a certain system-provided function for printing the stack trace or - maybe - by exactly imitating its output format.
John Level 17, Mansfield, Philippines
2 May 2021
i'm confuses with last task, can we compare a string and a number in string format using isGreaterThan() method?
Jonaskinny Level 25, Redondo Beach, United States
24 February 2022
You dont want to do that. You want to compare numbers to numbers, and strings as string.compareTo(string) because that is lexiconical (String(22) is < String(5))
The Chief Level 18, United States
24 April 2021
At least one of these tasks requires knowledge of certain things (e.g. StringBuffer) we haven't been taught yet. What's the reason behind that?
Justin Smith Level 41, Greenfield, USA, United States
21 July 2021
Many tasks, especially the hard ones, will do this. You may have to google how to do something. This is encouraged. Professional programmers don't memorize everything, and they, too, have to look things up sometimes. It's a practice you should get used to.
Rod Johnston Level 7, Melbourne, Australia
4 April 2021
Solved my problem - so frustrating. I was able to make the code verify by NOT passing a parameter when I made the method call.
Rod Johnston Level 7, Melbourne, Australia
4 April 2021
Anybody else having trouble with verification on Task0919 - Divide by Zero. Verification messgage I get is Code runs fine in IntelliJ.
Noob_Coder Level 22, Springfield, United States Expert
30 November 2020
A scary fairy tale is really a mess,I heard this story but not the same stuff lol
Agent Smith Level 38
21 August 2020
A scary fairy tale task uses this version: Wolf ate granmother, then he ate red riding hood and was killed by a woodcutter. How to work with SimpleDateFormat - read this article
IsoVent Level 16, Birmingham, United Kingdom
28 November 2020
Brilliant article! Done in 20 mins; including reading.