Final tasks

New Java Syntax
Level 10, Lesson 9
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."

10
Task
New Java Syntax, level 10, lesson 9
Locked
The whole duck isn't enough
The whole duck isn't enough
10
Task
New Java Syntax, level 10, lesson 9
Locked
Man and woman
Man and woman
10
Task
New Java Syntax, level 10, lesson 9
Locked
Dog registration
Dog registration
10
Task
New Java Syntax, level 10, lesson 9
Locked
Tom and Jerry
Tom and Jerry
10
Task
New Java Syntax, level 10, lesson 9
Locked
Display today's date
Display today's date

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

10
Task
New Java Syntax, level 10, lesson 9
Locked
Number of words in a string
Number of words in a string
10
Task
New Java Syntax, level 10, lesson 9
Locked
Binary encoding
Binary encoding
10
Task
New Java Syntax, level 10, lesson 9
Locked
IPv6
IPv6
Comments (3)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
22 December 2025
Better to describe algorithm, Instead of:

    public static String toBinary(int number) {
        String result = "";
        while (number != 0) {
            result = number % 2 + result;
            number /= 2;
        }
        return result;
    }
I got this solution:

    public static String toBinary(int number) {
        return String.format("%8s", Integer.toBinaryString(number)).replace(' ', '0');
    }
Feel guilty because I tricked the system :D
Andrei Karavai Level 30
6 November 2023
The level with the most tasks so far😃 It's so nice that I don't have to go to work tomorrow
Andrei Karavai Level 30
6 November 2023
in the task "Binary encoding" the condition is described not correctly. To pass it you don't need to show leading zeros. So it must be not: (each character on a new line): C - 01000011 o - 01101111 d - 01100100 e - 01100101 G - 01000111 y - 01111001 m - 01101101 ! - 00100001 But like this: C - 1000011 o - 1101111 d - 1100100 e - 1100101 G - 1000111 y - 1111001 m - 1101101 ! - 100001