Sort by salary

Report a typo

Write a class Employee (val name: String, val age: Int, val salary: Int) implementing the Comparable interface. Our developers use this class to sort the list of employees, and we know for sure that the best employee is at the bottom of the list.

Write a program in Kotlin
data class Employee(val name: String, val age: Int, val salary: Int) {
// write your code here
}
___

Create a free account to access the full topic