# LaTeX: problem with table captions when using the subfig pagkage [duplicate]

I run Arch Linux with texlive version 2019.52579-1. When I compile the LaTeX (Beamer) code below the table caption is "Figure: A simple table." That is, it includes "Figure:" instead of "Table:". The problem does not occur when the subfig package is not used or when the deprecated subfigure package is used instead. Suggestions are welcome. Thank you.

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usetheme{default}

\usepackage{subfig}

\begin{document}

\begin{frame}{A simple frame}

\begin{table}
\caption{A simple table.}
\begin{tabular}{ll}
\hline
a & b \\
c & d \\
\hline
\end{tabular}
\end{table}

\end{frame}

\end{document}