What should be placed instead of ... in order to get a "I will be a good citizen." result?

public class Test {    
    public static void main(String[] args) throws Exception {
        boolean toBe = ...
        PrinceOfDenmark hamlet = new PrinceOfDenmark();
        hamlet.tortureYourSelf((toBe || !toBe));
    }
}

class PrinceOfDenmark {
    void tortureYourSelf(boolean mind) {
        if (mind) {
            System.out.println("I will hate everybody including myself!");
        }
        else {
            System.out.println("I will be a good citizen.");
        }
    }
}

It's print Error:(3, 24) java: illegal start of expression

2017 Jun 16, 2:33:03 PM

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Java
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты