CodeGym /Courses /Java Syntax /Final tasks

Final tasks

Java Syntax
Level 5 , Lesson 12
Available

"Hello, soldier!"

"Hello, Captain Squirrels, sir!"

"I have great news for you. Here are some exercises to reinforce your skills. Work on them every day, and your competence will grow exponentially. They were specially designed for IntelliJ IDEA."

"Those previous exercises were for rookies. I've added some more advanced bonus exercises for the old-timers. Just for veterans."

Comments (63)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
nealgoogs Level 21, Eliot, United States
28 August 2024
I used stringtokenizer, probably overkill, but easier i think to remember than the split method.
Henry Level 6, Seattle, United Kingdom
4 January 2023
Nice
Pranai Rao Level 7, Nashua, NH, United States
21 July 2022
Here are the steps for Task about algorithms: 1. User inputs a number which tells us how many numbers will be entered to find the maximum of. This number is not included in the maximum calculation. This number is "N" 2. User enters "N" numbers. 3. You figure out the largest of those numbers. (Hint: the smallest possible int in Java is -2147483648) https://runestone.academy/ns/books/published/apcsareview/VariableBasics/minAndMax.html#:~:text=3.7.-,Integer%20Min%20and%20Max,number%20from%20%2D2147483648%20to%202147483647. You should stick to it, but if you're really stuck: https://textdoc.co/8F7mCz2AwutvqjgD
AndraxDev Level 15
16 February 2023
There's no need to use minimum value of integer (-2147483648). Just check in for loop if it is the first iteration and assign first entered number to the "maximum". Starting from the second iteration just check if other entered numbers is greater than "maximum".
Erick De Santiago Level 6, Dallas, United States
29 October 2021
Before attempting the last challenge, I read some of the comments because I was not so sure I followed the requirement. Once I understood what the task was, I actually broke down the task into simple steps. step 1 - make sure I allow a person to enter N number step 2 - if statement to determine if I can proceed etc. It was really challenging but also felt great being able to complete it!!
Dave Level 6, Saskatoon, Canada
7 July 2021
Okay, what's the point of "display today's date". I literally passed all requirements with:

        System.out.println("07 07 2021");

Banana Llama Level 8
18 July 2021
I think they meant for us to programmatically display the current date using other classes but with no extra explanation or even explaining how to do it in previous lessons your way is the simplest, yes. You can have a look at the SimpleDateFormat class
whoseunassailable Level 28, India, India
24 January 2022
You can know the answers of most of the solutions like let's say reverse (3,4,5,6,7) but you don't just System.out.println("7,6,5,4,3") or do you?
Pranai Rao Level 7, Nashua, NH, United States
21 July 2022
I did that exactly with no issues.
miguel Level 12, Corredor
6 July 2021
I don't understand why in the solution its use arrays, we haven't seen arrays at this point... I was trying with a while loop, but I've had to see another solution... In fact I was not far of the solution.
Myko Level 6, Dresden, Germany
25 December 2020
at the very beginning of the course I had some tasks which were identified as "Epic". But to be honest, they weren´t so mach difficult. The "Task about algorithms"... is not just "Hard", it could easily be specificated as real "Epic" 😸 At this level at least. I sow a few solutions already and spent about 2 days by trying to recognize the way, how this task could be solved... I will try again later 🙄🤦‍♂️
mastere Level 9, Rochester, United States
11 November 2020
Task about algorithms ... I can't figure it out. I think I will come back to it later. I cannot seem to pass the 5th condition.
mastere Level 9, Rochester, United States
11 November 2020
Console-based piggy bank was kind of tough for me. It took me longer than anticipated to clear 3 of the verifications. Finished it after 42 tries though. I kept trying to pass it an int and a string separately, but eventually I figured out I would just have to pass string and check if it was equal to sum and if not then parseInt() to change string to int and then add to sum.
Franco Polizzi Level 11, Werther, Germany
14 July 2022
Really a tricky one. I have to use "break" two times.
Peter Level 7, Enschede, Netherlands
17 October 2020
Really great exercises but the explanation can be improved a little bit. I've wasted quite some time figuring out a solution because it was not clear that (the first) N meant the amount of numbers to follow. Nevertheless, great exercises and I know now how to figure out the last one with either an array or without an array. Hint: while and if could be sufficient to fix it when not using an array.