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 differentiate var and val in Kotin?



How do you differentiate var and val in Kotin?..

Answer / Umakant

In Kotlin, 'var' is used to declare mutable (changeable) properties or variables while 'val' is used to declare immutable (unchangeable) ones.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

What is the use of abstraction in Kotlin?

1 Answers  


Why is kotlin preferred over java?

1 Answers  


List the Basic data types of Kotlin?

1 Answers  


How many types of constructors are there ? What are they ?

1 Answers  


Is there Ternary Conditional Operator in Kotlin like in Java ?

1 Answers  


Can you migrate the code from java to kotlin?

1 Answers  


What is nested class in Kotlin?

1 Answers  


What are the advantages of using kotlin?

1 Answers  


Can Kotline offer any additional functionality for standard Java packages or standard Java classes?

1 Answers  


What is the type of arguments inside a constructor? Why do you think they are val unless explicitly set to var?

1 Answers  


Why do we need write open before class name in Kotlin while working on inheritance?

1 Answers  


State the differences between val and var?

1 Answers  


Categories