Here is my code:
\documentclass{book}
\begin{document}
\tableofcontents
\chapter{Hello}
hello
\appendix
bar
\end{document}
When I compile this and create a PDF with command pdflatex foo.tex && pdflatex foo.tex, the output PDF does not contain the Appendix section at all. What is the mistake I am making in this code? The output "bar" is present in PDF but it is present in the same chapter as "Hello".