Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8
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}”)
}
