How do you check if two Strings are equal valued ?
Answer / Pradeep Sharma
In Kotlin, to check if two strings are equal, use the '==' operator or the '.equals()' method:nnval string1 = "Hello"nval string2 = "World"nnif (string1 == string2) {n println("The strings have the same value!")n}nelse {n println("The strings don't have the same value!")n}
| Is This Answer Correct ? | 0 Yes | 0 No |
Which companies use kotlin?
List the Basic data types of Kotlin?
Does Kotlin support both Explicit conversion and Implicit conversions?
Is kotlin strongly typed?
What are primitive data types in kotlin?
How many ways to create array in kotlin?
Does Kotlin programming allow macros?
Give me name of the extension methods Kotlin provides to java.io.File
State the advantages and disadvantages of kotlin?
Differentiate between break and continue?
How to declare a variable in kotlin?
What is the use of abstraction in Kotlin?