or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Kotlin
Sacándole los colores a Java
Pedro Joya Máñez
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →https://hackmd.io/@pedrojoya/kotlin#/
Acerca de mí
Pedro Joya
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →twitter: @pedrojoyamanez
¿Qué es Kotlin?
¿Por qué Kotlin?
Show me the code
El ; es opcional
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →val vs. var
Inferencia de tipos
Tipos referenciales, no primitivos
Template Strings (interpolación)
Raw Strings
if else es una expresión
No hay operador ternario
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Estructura for
Range
when como switch mejorado
when es una expresión
when como if else if
Hydration break
Definición de funciones
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Funciones que no retornan "nada"
Funciones con una única expresión
Argumentos con valores por defecto
Named arguments
varargs y spread operator
Top level functions and properties
Extension functions
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Lambdas
Lambdas como argumento
Smart cast
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Tipos nullable y no nullables
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Jerarquía de tipos
Nothing y throw como expresión
Operador de acceso seguro
Operador elvis
Operador bang bang
let
also
Hydration break
Constructor primario
Bloque de inicialización
Instanciación
Concepto de propiedad
Propiedades en Kotlin
Getter y setters personalizados
Acceso a propiedades
Notación infix
Concepto de data class
Data class en Kotlin
Desestructuración
Delegación
Object
Sealed classes
No exite la palabra reservada static
Sobrecarga de operadores
Asociaciones de operadores
Colecciones mutables e inmutables
Trabajo funcional con colecciones
Otros cambios
En resumen…
Referencias