This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
jbutler9279
wrote ...
2012/5/2
Please help me interpret this comment in to code
1
2
jbutler9279
2012/5/2
#
// Declare an Actor variable named fly that is initialized to null. What does this mean in code??
danpost
2012/5/2
#
It means to take what words are there, and use the right ones to make a valid Java statement (Hint: use 4 words)
jbutler9279
2012/5/2
#
Fly, null, Actor is all i know. I'm confused on the notation
danpost
2012/5/2
#
and 'is' (=)
jbutler9279
2012/5/2
#
This project is due tomorrow and i need to figure this out
danpost
2012/5/2
#
What would make the most sense?
jbutler9279
2012/5/2
#
ive tried public class Fly = null I keep getting a 'illegal start of expression' error
danpost
2012/5/2
#
Neither 'public' nor 'class' were any of the 4 words we mentioned. Also, I do not believe 'fly' is supposed to be capitalized.
jbutler9279
2012/5/2
#
Actor name fly=null
danpost
2012/5/2
#
Almost there! Remember that one of the words was 'is' (for the equal sign); so, you have one two many words.
jbutler9279
2012/5/2
#
name fly=null
danpost
2012/5/2
#
Last chance, name was not one of the words!
jbutler9279
2012/5/2
#
Actor fly=null
danpost
2012/5/2
#
Put a semi-colon at the end and see if it compiles.
jbutler9279
2012/5/2
#
sure enough. Thank you much!! That's one of many problems though :(
There are more replies on the next page.
1
2
X