Answers for "kotlin can you compare numerical strings"

1

compare 2 strings kotlin

string1 == string2 //returns true if they are equal and false if they are not
Posted by: Guest on January-07-2021
0

kotlin compare strings

val hello = "Hello"
    val world = "World"

    // equals() returns true or false
    val equals = hello.equals(world)

    // compareTo() will return 0 if true
    // Any non zero value is false
    val compare = hello.compareTo(world)
Posted by: Guest on October-27-2020

Code answers related to "kotlin can you compare numerical strings"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language