![]() |
7 лет на сайте
28 февраля 2025 |
![]() |
6 лет на сайте
28 февраля 2024 |
![]() |
5 лет на сайте
28 февраля 2023 |
![]() |
4 года на сайте
28 февраля 2022 |
![]() |
3 года на сайте
28 февраля 2021 |
#java
Кто-нибудь может подсказать, почему выдает ошибку? import java.util.Scanner; public class ChosenOne{ public static void main(String[] args) { System.out.print("Enter your name, please: "); Scanner sc = sc.nextLine(); if (b = "HarryPotter"){ Incompatible types. String can't be converted to boolean System.out.println("You are" + "is a Harry Potter"); } else { System.out.println("Dear" + "b" + "b" + "b" + "b" + "is a Harry Potter. " + "b" + "b" + "You are not Harry Potter"); } else { System.out.println("Dear" + "You are not Harry Potter"); } else { System.out.println("Dear" + "b" + "is a Harry Potter. " + "Please, go fuck yourself"); } } } } } } } } }}}}}}}}}}}}}}} Свернуть сообщение - Показать полностью
Показать 1 комментарий |