Footnotes, by default, cannot contain "naked" verbatim content. However, loading the bigfoot
package, for instance, will allow you to use a single-character shorthand for inline listings (such as |
) in footnotes without any problem.
Typesetting an inline listing in a caption using a single-character shorthand is more difficult; see, for instance, verb inside lstlisting caption. You're probably better off using \lstinline
instead.

\documentclass{article}
\usepackage{lipsum}
\usepackage{bigfoot}
\usepackage{listings}
\lstMakeShortInline[language=Java]|
\newcommand\inlineJava[2][]{\lstinline[language=Java,#1]+#2+}
\begin{document}
\begin{table}[tbp]
... some table ...
\caption{\inlineJava{break}}
\end{table}
\lipsum[1-3]
Here is some tidbit about |break| but that's not the whole story.%
\footnote{Java uses the |break| keyword.}
\end{document}
listings
package. It works like verbatim but it also "highlights" the code according to the some programming language dependent rules.