\documentclass[a4paper]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{listings}
\begin{document}
\thispagestyle{empty}

\section*{Simple Java Application}
\lstinputlisting[language=Java]{Test.java}

\end{document}
