Java equivalent of C++ output stream overloading
<p>I'm moving into Java from a C++ background and I'm currently getting to grips with the notion of not overloading operators, as is the Java way. I'm currently trying to figure out how to handle a situation where, if I were writing in C++, I would overload <code>operator&lt;&lt;</code> for my class and call it a day.</p>

<p>How should this situation be handled in Java? Is there a specific procedure with specific syntax, or it is as simple as writing something like</p>

<pre><code>public void PrintMyStuff( final MyClass myClass ){
    System.out.print( /*MyClass member1*/ );
    System.out.print( /*MyClass member2*/ );
}
</code></pre>
