[Tex/LaTex] How to change font size for specific lstlisting


I have a java lstlisting and it is too big and does not mach a single page.

Is there any way to specify font for specific listing, not all listings in document?

Best Answer

You can set the option directly with the lstlisting environment option basicstyle

    basicstyle=\tiny, %or \small or \footnotesize etc.
int isJava = 1;

See also this answer