• +91 9723535972
  • info@interviewmaterial.com

Kotlin Interview Questions and Answers

Question -
What is the difference between the variable declaration with val and const?



Answer -

Both the variables that are declared with val and const are immutable in nature. But the value of the const variable must be known at the compile-time whereas the value of the val variable can be assigned at runtime also.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners