Java : Generalisations

The Exercise “Generalisation” always show error even though i have written the code correctly ;

public class GeneralizationsB {
	public static void main(String[] args) {

	// ( 3 >= 3 && !(true || true) )
	boolean tricky= true;

	if(tricky) {

			System.out.println("Stuck in the past...");

		}else {

			System.out.println("Upgraded to the future!");


The output screen is displaying the output as desired by the instruction, yet the error message is appearing

The closing braces are missing for the main method and for the class. Perhaps that is the issue?


Please remember to include a link to the exercise in your topic post. It helps us make a bee line to the lesson and ensures we are on the same page. Thanks.


1 Like

I think the following is false

so they wanted you to print the code in the else block

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.