I have a List of objects(for example, Student(Name: String, RollNo: Int)) and is there a way to sort them in Scala?
Thanks in advance.
You can use sortWith() function or Ordered trait to sort the List objects. check out the below link:
Sorting a List of custom objects using sortWith function in Scala