Originally posted by Matt Fry:
What is the proper way to cleanly continue a line of code in Java? Say you have a long line of code and when emailing it to the nitpicker, it can be automatically broken into two lines by your email client. In Visual Basic I just used an underscore, but so far I have been unable to find a good way to do it in Java. Only became aware of it this morning when sending a revised assignment.
There are two places to address this - your editor and your email client. There definitely are times (such as in initializing arrays) when you will need to manually break up lines - they might otherwise run to 200 or more characters. At other times, though, you might just need to figure out a way to allow more characters per line in your editor.
Some have a default of 72 or 80. If you're working at six levels of indentation, you've already eaten up 1/3 of your available character columns with nothing but whitespace. The instructor's solution to GeekWatch has one line that goes to 137 characters. I set my editor to not wrap lines at all - I manually break them when they become difficult to read on my wide screen - somewhere around 120.
Once you have figured that out, you need to find a way to send it without introducing unwanted line breaks. I had trouble with this too - now I use one mail program for everything except submitting assignments to the cattledrive - for that I use another. I am mac based, though. I assume for your VB experience that you are PC based. I think thunderbird will allow you to send without line breaks. There are probably other clients that do so as well. Alternatively, at least one of the web-based email services (yahoo?) will do what you need.
HTH
-Adam