forked from JetBrains/kotlin-web-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(docs.topics.basicTypes): add notes
- Loading branch information
alfredo-toledano
committed
Aug 25, 2024
1 parent
e66360d
commit 2f82313
Showing
1 changed file
with
19 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
[//]: # (title: Basic types) | ||
|
||
In Kotlin, everything is an object in the sense that you can call member functions and properties on any variable. | ||
While certain types have an optimized internal representation as primitive values at runtime (such as numbers, characters, booleans and others), | ||
they appear and behave like regular classes to you. | ||
|
||
This section describes the basic types used in Kotlin: | ||
|
||
* [Numbers](numbers.md) and their [unsigned counterparts](unsigned-integer-types.md) | ||
* [Booleans](booleans.md) | ||
* [Characters](characters.md) | ||
* [Strings](strings.md) | ||
* [Arrays](arrays.md) | ||
|
||
> [Learn how to perform type checks and casts in Kotlin](typecasts.md). | ||
> | ||
{type="tip"} | ||
|
||
To learn about other Kotlin types, such as `Nothing`, `Any`, and `Unit`, look through the Kotlin API reference: | ||
|
||
* [`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/) | ||
* [`Nothing`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-nothing.html) | ||
* [`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/) | ||
* ⭐ALL is an object | Kotlin ⭐ | ||
* == | ANY variable, you can call | ||
* member functions | ||
* properties | ||
* NO primitive types (as | Java) | ||
* Platform types | ||
* == types / | ||
* have an internal representation -- as -- primitive values | runtime | ||
* == class' appearance & class' behaviour | ||
* _Example:_ | ||
* [Numbers](numbers.md) and their [unsigned counterparts](unsigned-integer-types.md) | ||
* [Booleans](booleans.md) | ||
* [Characters](characters.md) | ||
* [Strings](strings.md) | ||
* [Arrays](arrays.md) | ||
* others -> check | Kotlin API | ||
* [`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/) | ||
* [`Nothing`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-nothing.html) | ||
* [`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/) |