Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you check if two Strings are equal valued ?



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

Post New Answer

More Kotlin Interview Questions

What are High-Level Functions in Kotlin?

1 Answers  


What is the difference between const vs val?

1 Answers  


What are the features available in kotlin but not in java?

1 Answers  


Who is the developer of Kotlin?

1 Answers  


Where does the Kotlin run and what is the entry point of Kotlin?

1 Answers  


How to create static methods in Kotlin?

1 Answers  


List of extension methods kotlin provides to java.io.file?

1 Answers  


What is the use of function extension ?

1 Answers  


How to handle null exceptions in Kotlin programming?

1 Answers  


How to convert a String to an Int in Kotlin?

1 Answers  


What is the use of any() function?

1 Answers  


Who created Kotlin programming language and when?

1 Answers  


Categories