Java exerise 6 {white spaces}


#1

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]


#2

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?


#3

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


#4

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?


#5

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


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

That's how it's supposed to go.


#7

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


#8

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 )


#9

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.


#10

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