Java exerise 6 {white spaces}

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

boolean isFormatted = false;System.out.println(isFormatted);

}

}

i dont understandf how to make this go onto the fifth line. i have tried whitespacing (enter) on line 2 so everything will move down one and be more neat but it is still giving me a error. can someone please help me with this. [EDIT]

To break that line that starts with boolean isFormatted ... into two lines:

  • click between the characters that your want to split the line at
  • press return/enter

Did you try that already?

I have simply hit Enter and put System.out.println(isFormatted); on line 5, but still getting error!

That sounds perfect.

Under Get Help, use the “I want to restart this exercise” option and try it again.

If that doesn’t work, could you post a screen shot of your whole web browser so we can see what you are seeing?

i got it. press enter by the false;
ie. boolean isFormatted = false;(press enter here)
System.out.println(isFormatted);
they should have explained this better, press entered once you have entered a command so the last thing on the line is the command. thanks albions refuge

1 Like
boolean isFormatted = false;
System.out.println(isFormatted);

That’s how it’s supposed to go.

hello this is how I have exercise and just keeps throwing me the error and restart the exercise many times and just hope nothing and you can support me thanks

Just try to start the whole exercise again.
When it says :

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

boolean isFormatted = false;System.out.println(isFormatted);

}
}

Hit the enter button right after the first " ; " (after : boolean isFormatted = false )

It did the same for me when I tried to complete the exercise. It comes up as False on the R hand side of screen but it ticks the activity as completed and allows you to progress. This may just be a hiccup with the activity.

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