In the 1930s, both countries adopted aggressive militaristic attitudes toward their respective regions. This led to a rapprochement and, eventually, a political and military alliance that included Italy: the ''Axis''. During the Second World War, however, the Axis was limited by the great distances between the Axis powers; for the most part, Japan and Germany fought separate wars, and eventually surrendered separately.
Based on the above text, what's the best answer to this question: were the german and japanese allies in ww2?
yes