1 Answers
Here is the code to create class and object in Kotlin.
class chetanhotel
{
var name : String = “”;
}
fun main(args: Array<String>){
println(“Hello Customers”)
var customer = chetanhotel();
customer.name = “Chetan”;
println(“My name is : “+ customer.name)
//Other method
println(“My name is : ${customer.name}”)
}