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

\section*{Einfache Java-Anwendung}
\lstinputlisting[language=Java]{Test.java}

\end{document}
