\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{minted}
\begin{document}
\thispagestyle{empty}

% Shorthand
Despite it is a shorthand, \mint{html}|<h2>LaTeX im Studium</h2>| will be rendered on its own line.

% Inline variant
The method call \mintinline{java}{o.doSomething();} on the other hand will appear inline.

\end{document}