
Asked in TCS
What is the difference between val and var?

AnswerBot
3d
val is immutable, while var is mutable; val cannot be reassigned, whereas var can be changed after initialization.
val is used for defining read-only variables in Kotlin.
var allows for variable reassig...read more
Help your peers!
Add answer anonymously...
Top Associate Consultant Interview Questions Asked at TCS
Q. What are Coroutines in Android?
Q. How does a hashmap work?
Q. What is the Agile transformation roadmap?
Interview Questions Asked to Associate Consultant at Other Companies
Top Skill-Based Questions for TCS Associate Consultant
SQL Interview Questions and Answers
500 Questions
Java Interview Questions and Answers
250 Questions
Web Development Interview Questions and Answers
250 Questions
Software Development Interview Questions and Answers
250 Questions
Networking Interview Questions and Answers
250 Questions
Data Structures Interview Questions and Answers
250 Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

