In Kotlin there are:
val
const val
From the documentation :
Compile time constantsProperties whose value is known at compile time can be marked as compile-time constants using a modifier const. Such properties must meet the following requirements:Top level or feature elementInitialized by a value of type String or primitive typeNo custom getter
Compile time constants
Properties whose value is known at compile time can be marked as compile-time constants using a modifier const. Such properties must meet the following requirements:
const
Given that the kotlin compiler knows to identify initialized values ββ(for example, there is no need to determine the type of a variable in the initializer):
const .
, , getter, , .
, , const . , .
:
: const - , ... , , ? , - , - ? const, , .
, " " const.
const vals , . vals - getter.
const vals
vals
, - Kotlin Intellij Android Studio, object , val const val.
object
, 200 , , const val.
Source: https://habr.com/ru/post/1683500/More articles:C # Sort vs. JavaScript Sort - javascriptMongoDB error during mLab authentication - node.jsHow to import Clipboard.js library into Google Script application? - javascriptWoocommerce Update Price from an External Source - phpreduce to sum all the values ββin the array of the object failed - javascriptC ++ concatenates various types into a string for a function - c ++Google App Engine - how to properly execute gzip requests - httpThis application cannot automatically register in this QuickBooks data file - quickbooksSpark Dataframe will lose section - hadoophttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1683505/unable-to-update-datagrid-and-save-changes-to-database&usg=ALkJrhgmT_jp7HKm8u_rgVlMnted63xipQAll Articles