The European imperialism

Why do you think Japan and China had a different experiences with European imperialism in the 19th century?