Lesson 1 last part


<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
Generalizations.java:6: error: ‘;’ expected
boolean isComplete(true);
1 error


public class Generalizations {
public static void main(String args) {


	boolean isComplete(true);
	int awesomeLevel;
	int epicLevel;		



<do not remove the three backticks above>

i put a space before (true) not sure what i’m missing. it says set boolean variable isComplete to true… how am i supposed to do that?

Beginner here

isComplete is a variable not a method.

boolean isComplete = true;

I haven’t learned the difference between method and variable. If you have time to explain I’m happy to listen and learn

In general, variables are symbols that associate a name (the identifier) with a value. Like in:

boolean isComplete = true;
* Here, boolean is the type of the variable
* isComplete is the name of the variable
* and true is the value of the variable isComplete

However, you can not assign a value to the variable. eg:

int awesomeLevel; // Here, awesomeLevel is a variable and his type is int
int epicLevel; // Here also, epicLevel is a variable and his type is int

In object-oriented programming (OOP), a property or an attribute is just a variable that is inside a class or an object while a method is a function that is also specific to an object or to a class.
Contrary to the attributes, the methods are distinguished by the parentheses (). eg:

boolean isComplete(true);
* Here booleen is the return type of the function/method
* isComplete is the name of the method
* The value (true) between the parentheses is called an "argument"

I invite you to continue the course, you will understand better.

1 Like

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