C++ to Java code translation
<p>I have following code in C++:</p>

<pre><code>struct Foo { };

std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, const Foo&amp; f) {
   return os &lt;&lt; "Foo";
}
Foo foo;
std::cout &lt;&lt; print("Ha! %1%, x=%2% %1% %3%") % "Hej" % 1 % foo;
</code></pre>

<p>Because I don't think I understand that C++ code. What is appears, is that it is some kind of printf like function.
What I need, is to make it Java way. Any ideas, how to mark it work as it is, but in Java?</p>
