I want to present two big tables (9 columns each) side by side. For that I wrote this code:
\begin{table}
\parbox{.45\linewidth}{
\centering
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
& Class 1 & Class 2 & Class 3 & Class 4 & Class 5 & Class 6 & Class 7 & Class 8\\\hline
TPR & 1 & 1 & 1 & 1 & 1 & 0.917 & 1 & 1 \\\hline
TNR & 1 & 1 & 1 & 1 & 0.99 & 1 & 1 & 1 \\\hline
FPR & 0 & 0 & 0 & 0 & 0.0095 & 0 & 0 & 0 \\\hline
FNR & 0 & 0 & 0 & 0 & 0 & 0.083 & 0 & 0 \\\hline
\end{tabular}
\caption{Foo}
}
\hfill
\parbox{.45\linewidth}{
\centering
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
& Class 1 & Class 2 & Class 3 & Class 4 & Class 5 & Class 6 & Class 7 & Class 8\\\hline
TPR & 1 & 1 & 1 & 1 & 1 & 0.917 & 1 & 1 \\\hline
TNR & 1 & 1 & 1 & 1 & 0.99 & 1 & 1 & 1 \\\hline
FPR & 0 & 0 & 0 & 0 & 0.0095 & 0 & 0 & 0 \\\hline
FNR & 0 & 0 & 0 & 0 & 0 & 0.083 & 0 & 0 \\\hline
\end{tabular}
\caption{Bar}
}
\end{table}
Tables overlap with each other. I cannot reduce the sizes of the tables, their internal texts and respective captions.
Mycode generated two warnings also:

Line 264 and 277 contain just closing braces } .
These are the packages I've used so far :
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[paper=portrait,pagesize]{typearea}
\usepackage{mathtools}% ctan.org/pkg/mathtools
\usepackage{amsmath}
\usepackage{graphicx}
Edit
By following Pluton's suggestion in comment section, I've almost solved my problem except the right end of the right table is not aligned with the texts of the document.






geometrypackage? If so, please tell us wich options you selected. – leandriis Sep 26 '20 at 10:07graphicxpackage is needed if you want to include images in your document. Since your code does not include any image, this package is unrelated to the issue itself. Please show us the line that starts with\documentclass. – leandriis Sep 26 '20 at 10:11typeareaandgeometrycontradict each other. What kind of margin size do you actually want to have? The margin size crucially determines how much space is available for the tables and thus how one can make sure thex fit into the avialable space. – leandriis Sep 26 '20 at 10:19typeareaandgeometrypackages conflict with each other. – Mico Sep 26 '20 at 10:33