@kirilljsx, на бесплатной программе. У меня есть ещё вопрос. Я дополнил мой предыдущий код. Что-то получилось а что то нет. Получилась ошибка при добавлении двух строчек в описанной ниже программе. Вот эти 2 строчки:
dpuble catWeght = 4.5;
System.out.println(“Мой кот весит + catWeght + " кг”);
А вот и сама программа полностью:
/*
2. Welcome to JDoodle!
2.
2. You can execute code here in 88 languages. Right now you’re in the Java IDE.
2.
2. 1. Click the orange Execute button to execute the sample code below and see how it works.
2.
2. 2. Want help writing or debugging code? Type a query into JDroid on the right hand side ---------------->
2.
2. 3.Try the menu buttons on the left. Save your file, share code with friends and open saved projects.
2.
2. Want to change languages? Try the search bar up the top.
2. */
2.
2. public class Main {
2. public static void main(String[] args) {
2.
2. String catName;
2.
2. catName = “Уличный кот”;
2.
2. System.out.println("Это обычный " + catName);
2.
2. catName = “Леви”;
2.
2. System.out.println("Теперь его зовут " + catName);
2.
2. int catAge = 5;
2.
2. System.out.println(“Моему коту " + catAge + " лет”);
2.
2. dpuble catWeght = 4.5;
2. System.out.println(“Мой кот весит + catWeght + " кг”);
2.
2. }
2. }