Uncomment the last line so that the console prints out the value of epicLevel


#1

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

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

242;
}
}

I read another post and it said just take away the // but it still said it was wrong. That didn't work so I just put the answer, but I'm still lost.


#2

There is still a comment in your code, can you spot it?

242;

Is a valid statement but it will do absolutely nothing, the compiler will likely even ignore it since it has no effect.


#3

Am I supposed to take out /*System.out.println(epicLevel);*/ as well?


#4

I'm not sure which part of this exercise is not clear for you. Let's talk about a few things.

  • Ignoring everything else, do you know how to tell Java to print the variable called epicLevel?
  • Do you understand that putting /* */ around your code makes the code a comment?
  • Do you understand that comments are ignored?

#5

I cant get through on that code at all.... i have tried all possibilities but still does not work Can anyone help me and give me the result, also explain why should i type it like that please? Thank you


#6

have the same issue :confused:


#7

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

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

}
}
guys u just have to kick out(/* & */) .It will RUN properly


#8