Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Problems with comments

+12 votes
Every time I try to format my code, it puts each word from my comments on a separate line. Is this normal, or should I be doing something else?
asked Jan 15, 2016 in (Winter 15-16) by Taija Robinson (100 points)

2 Answers

+4 votes
I am having the same issue, I think it's just how java wants to format it since the code is a little long. I don't think it's that big of a problem as long as you try and line up the comments.
answered Jan 16, 2016 by Ryan McCarthy (100 points)
+4 votes

If your comments are extending way off to the right side of the screen, then when you do Source->Format, it will do that.

You may want to put those comments on their OWN lines, instead of putting them on the same line as the line of code that you're talking about.  

You can also use Source->Correct Indentation, if you just want it to fix the tabbing, without messing with other aspects of how your code is formatted.

 

answered Jan 16, 2016 by Forrest Stonedahl (3,308 points)
...