Both Japan and Europe had landowning and non-landowning castles, they both used hereditary castle systems, people born peasants had no chance of becoming anything other than peasants, almost all castles had: moats to discourage building of tunnels, portholes to use as guns and a main gate that could be used as a trap.