Came across a scenario where I had to sort a wrapper class. Normal list sorting is simple, list.sort(); would help. But for a wrapper class, it's not straight-forward but it isn't that hard. Below is a simple wrapper class without sorting - this wrapper has 2 columns : Area and AD. global class AreaWrapper{ public String …