What am I doing wrong setting this integer variable in the intro 12/12


#1
awesomelevel * 2 = epicLevel;

The above is what I typed in response to

Set the int variable epicLevel equal to awesomeLevel multiplied by 2.

previous line that got no error messages was

121 = awesomeLevel;


#2

fair error message, given what you did is set epicLevel equal to aweomLevel multiplied by 2. Which won’t work, given we can’t assign values to integers


#3

thanks!

like this?

public class Generalizations {
	public static void main(String[] args) {
//kljdsgf

		boolean isComplete = true;
		int awesomeLevel = 121;
		int epicLevel = awesomelevel * 2;		
		System.out.println(epicLevel);
		

	}
}

#4

That looks much better indeed


#5

Thanks! maybe there’s a bug on the page then because it’s still giving me error messages. :frowning:


#6

What error message do you get? Can you also provide exercise url so i can debug in the lesson?


#7
Generalizations.java:7: error: '.class' expected
		int epicLevel = int awesomelevel * 2;		
		                    ^
Generalizations.java:7: error: illegal start of expression
		int epicLevel = int awesomelevel * 2;		
		                                 ^
Generalizations.java:7: error: ';' expected
		int epicLevel = int awesomelevel * 2;		
		                                  ^
3 errors

#8

https://www.codecademy.com/courses/learn-java/lessons/introduction-to-java/exercises/generalizations?action=resume_content_item


#9

that is why i missed it, small detail. Variable names are case sensitive, awesomeLevel is not the same as awesomelevel.


#10

Dang. Good catch. Thanks for all your help!


#11

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