Learn Java section 6/12


#1

https://www.codecademy.com/en/courses/learn-java/lessons/introduction-to-java/exercises/whitespace?action=resume

when i click run the right side states false, never had this msg. Is that a good thing? I was asked to move one line to another, did and wasn't correct then tried to make whitespace ect in different areas no dice. Tried also after getting and error message about boolean to use equal sign, last msg was false not sure what that means ie do I go on or rewrite line.


Replace this line with your code.


#2

Here is why you see false displayed when you run your program:

You first stored the value false in a variable called isFormatted.

boolean isFormatted = false;

Then you told Java to print that variable:

System.out.println(isFormatted);

Do you see how that works now?

About the rest of your question, you are going to have to post a screenshot so that I can see what you see.


#3

I only put the = false because in the error message it mentioned the boolean so I tried to make one to make the error go away. Initially I just dropped the is formatted portion to the 5th line like the instructions asked. Not sure at that point what I did wrong in correlation to what was asked of me.

So with your input are you stating that the equation is actually false? I am asking because it isn't in red like an error, so is it still wrong? or is this response just stating what is being shown, a false statement?


#4

Okay I get the part that I asked it to Print the isFormatted and if isFormatted=false then it should spit out false. I still however do not know how to input what the question/instructions are asking for.


#5

https://www.codecademy.com/en/courses/learn-java/lessons/introduction-to-java/exercises/whitespace?action=resume

I guess this is actually the right answer?
False?


#6

Yes, that is correct.


#7

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