CodeGym /Courses /Java Core /Bonus task | Lesson 11 | Level 8

Bonus task | Lesson 11 | Level 8

Java Core
Level 8 , Lesson 11
Available

"Hey, soldier!"

"Good day, Captain!"

"I've got awesome news for you. Here are some exercises to reinforce your skills. Do them every day and your skills will grow at an insane speed. They were created especially for IntelliJ IDEA."

10
Task
Java Core, level 8, lesson 11
Locked
ABCs
ABCs
10
Task
Java Core, level 8, lesson 11
Locked
Spaces
Spaces
10
Task
Java Core, level 8, lesson 11
Locked
Two in one
Two in one
10
Task
Java Core, level 8, lesson 11
Locked
Combining files
Combining files
20
Task
Java Core, level 8, lesson 11
Locked
Rounding numbers
Rounding numbers
20
Task
Java Core, level 8, lesson 11
Locked
Symbol frequency
Symbol frequency
20
Task
Java Core, level 8, lesson 11
Locked
Finding data inside a file
Finding data inside a file
20
Task
Java Core, level 8, lesson 11
Locked
Threads and bytes
Threads and bytes
10
Task
Java Core, level 8, lesson 11
Locked
Files and exceptions
Files and exceptions
20
Task
Java Core, level 8, lesson 11
Locked
Building a file
Building a file

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

10
Task
Java Core, level 8, lesson 11
Locked
Encryption
Encryption
20
Task
Java Core, level 8, lesson 11
Locked
Prices
Prices
20
Task
Java Core, level 8, lesson 11
Locked
Prices 2
Prices 2
Comments (41)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Rene Level 1, Netherlands
24 September 2024
The bonus tasks were sweet but certainly not simple for me. I learned a lot shall we say :) If you want some practice you should definitely try them. I sometimes struggle how to structure my program. What goes into main() and should i create a method for a particular piece of coding. I do get them validated in the end but whether they are good pieces of code....
Simphiwe Level 33, Johannesburg, South Africa
29 March 2023
How do you round down when the float is 2.50?
Mike S Level 28, Saint Louis, United States
14 February 2023
I completed 10 / 13 of these, but tried hard on every one of them. Conceptually, they all made sense. Hope I'm still on the generally right track...
Dawn( #11020889) Level 37, Toronto, Canada
11 December 2022
finally I solve the problems!
Aldo Luna Bueno Level 1, Peru
23 March 2022
Wow, not an easy one. Let's go!
Hoa Nguyen Level 15, Australia Expert
18 February 2022
I think CodeGym should allow checking solutions multiple times to facilitate learning from mistakes.
matemate123 Level 50, Kraków, Poland
26 January 2023
It would be fun, sometimes you're curious about different way to resolve task and you can't check it. So loss. I'm curious, why is that?
Hoa Nguyen Level 15, Australia Expert
18 February 2022
In task 1, what is the meaning of args[0] in new FileReader(args[0]))?
Hoa Nguyen Level 15, Australia Expert
18 February 2022
I got it. In case someone is confused like me, the question asks to pass the file name as the first argument, thus FileReader(args[0]) is to achieve that.
ジョーンズJ Level 47, United States
20 January 2022
私は最後のものに苦労しています...😞、それを確認しようとするたびに私はこれらを間違えます • When the program is started with the arguments "-u id productName price quantity", the product information in the file should be updated. • When the program is started with the arguments "-d id", the line for the product with the specified id should be removed from the file.
John Squirrels Level 2, San Francisco, Poland
2 February 2022
Which task are you referring to?
Jurij Thmsn Level 29, Flensburg, Germany
16 April 2021
Skyrocketing difficulty 🤯 I'd love to have an overview when to use which reader/writer. And which one does exactly what. I know and used FileInputStream, FileOutputStream, FileWriter, FileReader, ByteArrayInputStream, ByteArrayOutputStream, BufferedInputStream, BufferedReader, BufferedWriter, InputStreamReader (...) But I am really confused about the differences, return types and when to use which. before doing the exercises, I recommend to look further into String.format. e.g. here: https://www.youtube.com/watch?v=moQ3Kr8ouiU And how to use TreeSet and substring, too. And make sure not to write and read from the same file at the same time! Keep going!
Sansho Level 19, Bordeaux, France
5 July 2021
Hey Jurij, I don't know if you have the answer nowadays, but this is what I've found and understood: Basically, the streams are working with bytes, while the Writer/Reader with chars. And so, as BufferedStreams are faster than Streams, I guess that BufferedWriter/Reader are faster than Writer/Readers 🙂 So, that means: 1) If you are dealing with binary data (e.g. an image) use Streams. 2) If you are using non-ASCII Unicode characters, e.g. Chinese, use Readers/Writers. 3) If you are using ordinary ASCII text (the traditional 0-127 characters) you can (usually) use either. (thanks to this stackoverflow answer )
Gellert Varga Level 23, Szekesfehervar, Hungary
10 July 2021
Hi Jurij, Streams/Readers: I think once everybody should take the time to study this topic in the Oracle API, for example: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html Based on this, I have drawn Stream family trees and Reader family trees for myself, and I made notes about the main classes by translating them into my own native language. I don't claim to understood everything... but you can certainly learn from it, it makes the picture clearer! There you can see exactly what each method returns, what the constructor expects, etc etc.
Chandan Thapa Level 22, Dubai, United Arab Emirates
5 January 2021
It was hard! But learned a lot by doing this! Feels so awesome after completing all!! You can do it!