I am using the listings package and the listings are not floating from page to page though i use float like the following:
Code: Select all
\lstset{language=java}
\begin{lstlisting}[float,frame=trbl,caption={update method},
captionpos=b,label=updatemethod]{}
private void update()
{
....
}
\end{lstlisting}