Nelson Mandela and Gandhi both believed that jail time was a good thing and that it encouraged change. They both served many years in prison.
Martin Luther King Jr. shared similar views to Gandhi. They both believed that you should use non-violent protest to change the ways of the government. They also both believed that jail time was a good thing.
Gandhi believed that people should use non-violent protests to resolve their difference. Gandhi used non-violent protests, such as the salt march, to change laws in India and South Africa.