Did you place each code statement on its own line?


#1

About the same issue, codeacademy has wondered to me :
1.The given code is poorly formatted. Place System.out.println(isFormatted); on line 5 so that it is easier to read.

i have written that in my console :

1 public class Variables {
2 public static void main(String[] args) {
3
4 int myNumber = 42;
5 System.out.println(isFormatted);
6 boolean isFun = true;
7 char movieRating = 'A';
8
9 }
10}

But when i click on "RUN", the console has displayed to me that : Did you place each code statement on its own line?

Thus, please, Can a good soul help me to solve it?


Me need help
#2

Ah! Looks like some of this code is from a different lesson! The int, boolean, char, is not needed. But you need to create another boolean on line 4 called:
boolean isFormatted = False;

Hope this helps
~Candy :slight_smile:


#3

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