do it in some method :public class Main { public static void main(String[] args) { boolean yes = true; System.out.println(yes ? "Hello" : "Good bye"); }}