This bit is rather scary after you finish reading the whole thing. It is however very simple.
It looks very hard and difficult but just you wait and see when you apply it
I typed //return a + b; and that resulted in a compile error, so then I clicked cheat. I then typed exactly what the cheat option said, //return a+b;, and got a compile error as well, so I don't really understand the exercise.
You need to remove the // or it will just be a comment instead of code.
when adding // to lines you make that line a comment like
//hey there :D
correct me if i'm wrong
"return" has no mathematical function. It is to like "return 5+5" to return the sum of 5+5 to the screen so when the program runs it shows the sum of 5+5 ?
I know I'm not clear but if someone understands pls reply :P
return is used in a method to return a value to the code that called it (see next page). This is similar to how a mathematical function returns a value.
I keep getting an error. I've clicked on the hint and typed return a + b. I've created an int sum and wanted to make that the value of a +b and return that. All to no avail. Am I missing something. Is there a screen shot somewhere of how the solution should look.
You put doStuff below the boilerplate code, which messed things up. When in doubt, you can always reset your code and try again.
It will be easy if you read the article carefully
its not as complicated as it looks
I read quick help