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();

    }

What is your error?
I hope that flipCoin is not null

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).

try to split that using split command

and then concatenate....

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.