For a certain range of "other walks". Rich and upper middle class kids would seldom work there for example.
Which makes compulsory army service an even better version of the "meet people from all walks of life". It also helps with not over-dramatizing things (think "emo" teens) and generally being lazy (think kids whose parents do everything for them well into their 20s). And most people could do with more discipline, not less.
Unfortunately it comes with the baggage of you know, killing people. That said, in countries not in the offense this (being involved in combat) is almost never the case. Though these countries, with exceptions like Switzerland and Singapore, don't have an army service.
Perhaps an alternative, where people have to spend time with all walks of life, privileges are minimal, and they get to do some good, like e.g. planting trees, helping in crisis situations, etc, would be great.