Just got the wonderful Line is longer than 80 characters error.
I realize this could very well be a n00b question ;-)
I tried splitting after the ":" putting both lines in brackets and connecting them with + " but didn't work well for me, anyone know how?

public String toString()
    {

       return "The value of the coin is: "+cents+"\nThe coin is facing:"+flipCoin.toString();

    }

Just got the wonderful Line is longer than 80 characters error.

Strange never heard of this one before (at least not yet), Give us exactly what your compiler is throwing up at you.

I was using a special online simulated environment for a homework assignment. I ran a style analysis, which mostly picks up on things like: indents in multiples of 4, more than 80 characters per line. I already turned in that assignment but I'm still interested in learning it, teacher could throw it my way later. I guess it was more of a proper usage thing as opposed to an error, because it was under style analysis, it compiled fine.

JavaAddict, thanks for the response, I'm not quite sure what you mean. (sorry about my java n00bisms).

because it was under style analysis, it compiled fine.

And you forgot to mention that which was the most important piece of information.

public String toString() {
    return "The value of the coin is: " + cents +
          "\nThe coin is facing:"+flipCoin.toString();
}

try to split that using split command

and then concatenate....

I have no clue as to why you suggested that.

This article has been dead for over six months. Start a new discussion instead.