I dont get it "Set the int variable "


#1

My problem is with exercise number 4
https://www.codecademy.com/en/courses/learn-java/lessons/introduction-to-java/exercises/generalizations

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

this was my try ...

int epicLevel = awesomeLevel * 2;

how to use what i have named in an int as a figure on another int .

sorry im just starting and have almost 0 idea .


#2

@cssblaster34216,
Here some backoground info
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/opsummary.html
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/op1.html


#3

i tried to use it as this
int epicLevel = 112 * 2; before this one ,but it gave me an error

so i thought it asked to define (awsomelevel) first in int
then add it to another int like epiclevel .

that got me lost ...am i miss understood the question ?


#4

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

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

}

}

i tried also

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

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

}

}


#5

hehe it was a spelling problem with "awesome" Thanks .


#6

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