\lstinputlisting[
  language=Java,
  numbers=left, % line numbers
  showstringspaces=false, % spaces in strings
  keywordstyle=\color{blue}, % keyword color
  basicstyle=\ttfamily\small, % overall font and size
  literate={ä}{{\"a}}1 {ß}{{\ss}}1 % special characters
]{exercises/source-code-listings/Source.java}