• +91 9723535972
  • info@interviewmaterial.com

Kotlin Interview Questions and Answers

Question - What are pair and triple in Kotlin?

Answer -

Pair and Triples are used to return two and three values respectively from a function and the returned values can be of the same data type or different.

val pair = Pair("My Age: ", 25)
print(pair.first + pair.second)

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners