Let's say you have a list of users and each user is represented by an object of the User class, which has the fields name, age and email.
data class User(val name: String, val age: Int, val email: String)
Write the UserComparator class that implements the Comparator interface to sort the list of users by their age in ascending order, and if the age of some users is the same, then sort them alphabetically by the username.