Lesson 1, exercise 12 (Introduction of Java)

Hello! I’m a newbie for Java Programming Languages.

Can someone help me?

I can’t find the answer for this.

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

And this is my code :

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

    //This is my first project!

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

}

I’m stuck on this lesson. I hope you guys can help me to solve this problem :slight_smile: :smile:
Thank you :blush:

HI you didn’t do that
Set the int variable epicLevel equal to awesomeLevel multiplied by 2.
this line

int epicLevel = 121 * 2;  

where you put 121 you should put awesomeLevel instaed of it’s value (121).

hey @wizmarco when i programmed it as int epicLevel = (awesomeLevel * 2); i got the correct print out but it still didn’t pass the exercise for me. i’ve already taken and completed a full java course in college so im using code academy as a refresher and this is how i was taught to do it. Is this not the right way, or is there a more efficient way?

1 Like

HI
when i programmed it as int epicLevel = (awesomeLevel * 2); i got the correct print out but it still didn’t pass the exercise for me.
well maybe there is another error or there is a bug on the lesson…
…refresher and this is how i was taught to do it. Is this not the right way, or is there a more efficient way
If you are talking about this

 int epicLevel = (awesomeLevel * 2);

I don’t see another ways (maybe there will be and I don’t know about it) to do it…

you should copy ( awesomelevel ) and paste it in int epiclevel= paste it here * 2;
or you should write the word with its capital letters like the letter ( L ) in the word awesomeLevel

Dude… here do one thing System.out.println(epicLevel); keep this 8th line ok don’t change it because I think the compiler by default its checking error in 8th line so lets try this buddy

what do about 5.
Uncomment the last line so that the console prints out the value of epicLevel.

what you have to do is take of the // at the start of the code
from //System.out.println(epicLevel); to System.out.println(epicLevel);

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