Skip to content

Commit

Permalink
Update MultipleStringInKotlin.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
2030481 authored Sep 10, 2022
1 parent bea310b commit d94359d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions MultipleStringInKotlin.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
fun main(args: Array<String>) {
// raw string - multiline string
var str = """My
/*var str = """My
|name
|is
|Yash
|Raj
|Movies
""".trimMargin()
println(str)
println(str) */
var x = "HelloThisIsRavi"
var y = "HelloThisIsRavi"
var z = "Ravi"
println(x===y) // true , as both are pointing to the same StringPool
println(x==z) //false since values are not equal
println(x===z) //false
}

0 comments on commit d94359d

Please sign in to comment.