JAVA · ОСНОВЫ · LESSON 03
Variable words
String and text connection · about 12 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Reprint the program. Check the space after the word «Мой».
public class Main {
public static void main(String[] args) {
String pet = "пёс";
System.out.println("Мой " + pet);
}
}Open the editor for class workSolve it yourself
Save the name «Аня» to the name variable of String type. Connect the text «Привет, » and name via +, then output the phrase.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework