JAVA · ОСНОВЫ · LESSON 22
Compare the words
String.equals · about 14 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Type an example manually. Check the signs and brackets.
public class Main {
public static void main(String[] args) {
String answer = "да";
System.out.println(answer.equals("да"));
}
}Open the editor for class workSolve it yourself
Create String word = «кот». Using equals, compare word with the word «пёс» and derive the result.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework