Why did Jesus tell the rich young ruler he could be saved by obeying the commandments?

This article has been translated into the following languages:

عربى 简体中文 繁體中文 Español پارسی Français Indonesia Italiano Kiswahili Magyar Polski සිංහල Tagalog