11
Task
New Java Syntax,
level 11,
lesson 6
Locked
There are various kinds of apples
Fix a mistake in the code so that the program displays the phrase: "The phones are the same".
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
Every letter is lowercase
The program should read a string from the console and display it in all lowercase letters.
Fix a mistake in the code, so that the program works correctly.
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
Forgotten initialization
In this program, an array is filled with the numbers from 0 to 9 and displayed on the screen:
But thanks to an error, the program doesn't compile.
Make the program compile and work correctly.
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
Instance field shadowing
The main method calls the add method, which should increase the value of the salary field of the Solution class
by the passed value, but we get 0 when we output the salary field. Make the program work correctly.
The best way to internalize theory is to practice it. If this topic seemed difficult to you, we recommend solving extra tasks in order to help you fill in the gaps in your knowledge. Or if the few required tasks are enough for you, feel free to move on to the next lessons.
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
Feel like a university dean
We have a student group at a university and a method that should remove a specific student from the group,
but for some reason it doesn't work.
Your task is to find the error and fix it so that the exclude method does actually remove the student.
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
MacCoffee 3 in 1
We have a set of classes for making 3-in-1 coffee, but for some reason the coffee won't brew — the task
does not compile at present. Find and fix one mistake in the code.
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
Making a list of students
The main method should add two students to an array and then display on the console using the printStudents method.
Make corrections in the main method so that the program works.
Here are some tasks to consolidate the material from the previous lessons:
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
Student
The main method of the Solution class creates an instance of the Student class with a specific name,
but the program does not compile.
You need to fix an error in the Student class to allow the program to compile and display the student's name
on the console when it runs.
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
An inherited phone
The extends and implements keywords must be correctly positioned in the provided classes to allow the program to compile.
11
Task
New Java Syntax,
level 11,
lesson 6
Locked
Digits as text
The program converts digits to text. The Solution class has a static digitToText(char) method,
which returns the textual representation of digits. In the main method, a number is translated
into a textual representation, but only "nine nine ..." is displayed. Add the required number of break stateme
GO TO FULL VERSION