"Hello, soldier!"

"Hello, Captain Squirrels, sir!"

"Here are some exercises to level-up your skills and solidify knowledge."

2
Java Syntax, level 7, lesson 12
Locked
Display numbers in reverse order
You know that you can solve problems in many ways, right? Yes, of course you know that. However, in this particular task we'll ask you to recall the for loop and use it to perform some manipulations. Here's what you need to do: enter 10 numbers from the keyboard, put them in a list, and then display them in reverse order.
10
Java Syntax, level 7, lesson 12
Locked
Shuffled just in time
Games with lists are the best! Does that sound like an advertisement? Perhaps the best advertisement for a programming language is its frequent use. Let's advertise lists as we complete this task: enter numbers m and n, enter n strings and put them in a list. Then perform a simple manipulation: move the first m strings to the end of the list
5
Java Syntax, level 7, lesson 12
Locked
Min and max in arrays
The Fault Line residential zone has only 20 houses, but their numbers were assigned haphazardly. It turns out that Fault Line's starting and ending numbers were set randomly. That's what makes it so interesting and unpredictable! Let's write a little Fault Line emulator: we'll determine where its begins and where it ends. To do this, we'll cram the housing block into an array, populate it with house numbers, and find the largest and the smallest among them.
5
Java Syntax, level 7, lesson 12
Locked
The end
Let's create a list of strings, entering them from the keyboard until you get bored. You might get bored at any moment, and we need to come up with a special word to signal this. Let's use the word "end". And why do we need these strings, you ask? And we answer: So we can add them to a list, and then display them.
2
Java Syntax, level 7, lesson 12
Locked
Countdown
We're all for peace and fighting terrorism, but we'll write a countdown program just the same. Our program should count from 30 to 0 and then end with a "Boom!". Don't worry. The "Boom!" will be peaceful, silent text. The program should advance the countdown 10 times per second. To add a delay to the program, use Thread.sleep(100);
10
Java Syntax, level 7, lesson 12
Locked
Family census
Let's try to create a program for a family census. To do this, we'll write a Human class with String name, boolean sex, int age, Human father, and Human mother fields. To practice, create objects and fill them with data so we end up with two grandparents, two grandmothers, a father, a mother, and three children. Display the objects on the screen.
2
Java Syntax, level 7, lesson 12
Locked
Move one static modifier
Not everyone can be static! And if a static modifier ends up where it shouldn't be, anything could happen! This is exactly what happened in the code you'll see once you open this task: one static modifier ended up in the wrong place. Help the program compile by putting the modifier where it belongs! Thanks.
5
Java Syntax, level 7, lesson 12
Locked
Cat code won't compile
The first postulate of the intergalactic railway states: if cats have a problem, abandon everything to help them solve it. Because having problems is contrary to the nature of cats. So we have a program that displays cat data after reading it from the keyboard. But something isn't right, and it won't compile. Fix the bug!
5