Why Does Japan Have a Bad Relationship With Neighbors?

At first glance, China, Japan and South Korea seem to have a lot in common. But why do they dislike each other, especially Japan?