Skip to content

Instantly share code, notes, and snippets.

@vvksh
Created March 12, 2018 03:07
Show Gist options
  • Save vvksh/14ea2e63ecd2b1c167e4a56b1826f04d to your computer and use it in GitHub Desktop.
Save vvksh/14ea2e63ecd2b1c167e4a56b1826f04d to your computer and use it in GitHub Desktop.
\usepackage{listings}
\usepackage{color}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{frame=tb,
language=Java,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
\begin{lstlisting}
// Hello.java
public class Hello extends HelloWorld {
public static void main(Strings[] s) {
System.out.println("Hello");
}
}
\end{lstlisting}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment