• +91 9723535972
  • info@interviewmaterial.com

Kotlin Interview Questions and Answers

Question - What is the forEach in Kotlin?

Answer -

In Kotlin, to use the functionality of a for-each loop just like in Java, we use a forEach function. The following is an example of the same:

var listOfMindOrks = listOf("mindorks.com", "blog.mindorks.com", "afteracademy.com")
listOfMindOrks.forEach {
 Log.d(TAG,it)
}

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners