Include java code to display text in latex
<p>is it possible to do something like the following in texlipse?</p>

<pre><code>\documentclass{article}
\usepackage{listings}  
\begin{document}

\section{Title}
import java
\subsection{Subtitle}

I want to display some java result

\begin{lstlisting}   
 printMyString()       
\end{lstlisting}              
\end{document}
</code></pre>

<p>Where printMyString() is for example:</p>

<pre><code>public String printMyString() {
return "Hello World";
}
</code></pre>

<p>thanks!</p>
