How do you define a string in Kotlin?

String is an array of characters. Kotlin Strings are more or less similar to the Java Strings, but with some new add-ons. Following is the syntax to define a string. var str: String = “Hello” //or var str = “Hello” var newString: String = ‘A’ //ERROR var newString: String = 2 //ERROR .

Sizin İçin Seçtik  What qualifications does a UX designer need?

Leave a Reply

Your email address will not be published. Required fields are marked *