I want to display text in the mathtt font in two separate lines, but the following doesn't work
\documentclass{article}
\begin{document}
\title{Scratch}
$$\mathtt{Say\ hello} \newline \mathtt{to\ my\ little\ friend}$$
\end{document}
It's not working if I replace \newline by \\ nor if I have a single \mathtt{}. The result in all cases is as if there is no \newline or \\.
I need my text to be formatted this way to look like JEdit code for the theorem prover Isabelle. If you have any other suggestions for how to do this I'll be more than happy to hear.

listingspackage is more suitable then a math environment? – samcarter_is_at_topanswers.xyz Feb 11 '18 at 21:20\newlinedoes not look healthy as well. Why usingmathhere at all? – Feb 11 '18 at 21:38\newlinein math displays to begin with. – egreg Feb 11 '18 at 21:41