![]() long d = 1234567890L // ok copy code Copy the code In Java, Long terminations with l can be compiled, but not recommended (lowercase L, which looks like the number 1). The value must be specified and cannot be changedĬompared with the Java int a = 2 final String b = "Hello Java" Copy the code Copy the code Var a = 2 val b = "Hello Kotlin" copy code Copy the code Confusing Long type tag Kotlin's variable declaration, somewhat similar to TypeScript, is a more modern form of modifier variable names: type = value, where the type declaration can be omitted. This section focuses on the built-in types and simple usage of Kotlin Declaration of variables Val b: String = "Hello Kotlin" copy code Copy the code
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |