Let us say that I have a class in Kotlin like below
Also, let us define an infix function generateEmailWithDomain which generates the email address based on the name with the given domain
class Person(var name: String) {}
infix fun Person.generateEmailWithDomain(domain: String): String = "${this.name}@$domain.com"
Now, as it is said that Kotlin is 100% interoperable with Java, how can I make use of this infix function in a JAVA class?
The above usage of infix may be inappropriate but I would like to know how this can be used in Java.
Please correct my understanding if it is wrong.