Saltar al contenido principal
ProductosHerramientas de escritorioTASTECADRevisión de planosTASTEFILESGestión de archivosTASTEFTPTransferencia de archivosTASTESSHEspacio de trabajo remotoTASTEZIPCompresión y extracciónTASTEWINMGestión de archivosHerramientas para desarrolladoresTASTECODEEntorno de desarrollo integrado para RustTASTESTUDIOEntorno integrado de desarrollo y pruebasTASTEETLIntegración de datos (ETL)ServidoresTASTEREMOTEServidor de escritorio remotoTASTEGEOServidor geoespacialTASTEMAILEspacio de trabajo de correoInversiónTASTESTOCKAplicación de escritorio de trading automático de accionesEmpezarDescargasDocumentaciónComprarTodos los productos
Marketplace
Noticias
TecnologíaNoticiasNoticias de desarrollo de hoyDocumentaciónLenguajes de programaciónRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks de apps y escritorioTauriFlutterReact NativeElectronAlgoritmosFundamentos de algoritmosAlgoritmos esencialesAlgoritmos avanzadosAlgoritmos prácticos
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparateGuía de la comunidad
ColaboraTransferencia técnicaDesarrollo de sitio webDesarrollo de app de escritorioCanal de lanzamiento y pagosSocio de ventasContacto
ServiciosEscritorio remotoPaquetes de instalación a medida
TASTEDEV
Productos

Herramientas de escritorio

TASTECADAbre planos complejos con ligerezaTASTEFILESSolo los archivos que necesitas, lo más rápido posibleTASTEFTPEl camino más limpio para tus archivosTASTESSHEntre tu servidor y tú, una conexión más sólidaTASTEZIPComprime más rápido, descomprime más seguroTASTEWINMUn gestor de archivos de dos paneles pensado para el teclado

Herramientas para desarrolladores

TASTECODEEdita, compila, depura y prueba apps de Rust en una sola ventanaTASTESTUDIODe la edición a las pruebas remotas y las correcciones con IA aprobadasTASTEETLMueve datos viendo sus valores

Servidores

TASTEREMOTEUn escritorio remoto que funciona en tu propio servidorTASTEGEOUn servidor geoespacial compatible con GeoServer, reconstruido en RustTASTEMAILRecupera el control de tu correo

Inversión

TASTESTOCKTrading automático de acciones según las reglas que tú defines: cuándo y qué

Empezar

DescargasÚltimas versiones de cada productoDocsCómo usar cada productoComprarSuscripciones y licencias perpetuasTodos los productosTodos los productos de un vistazo
Todos los productos
MarketplaceNoticias
Tecnología

Noticias

Noticias de desarrollo de hoyAnuncios oficiales de lenguajes, frameworks, GitHub e IADocumentaciónGuías de lenguajes, frameworks y algoritmos

Lenguajes de programación

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks de apps y escritorioTauriFlutterReact NativeElectron

Algoritmos

Fundamentos de algoritmosAnálisis de complejidad · Ordenamiento · Búsqueda · Estructuras de datos básicas · Árboles y montículosAlgoritmos esencialesRecorrido de grafos · Camino mínimo y árbol generador mínimo · Programación dinámica · Algoritmos voraces · Divide y vencerás · Backtracking (vuelta atrás)Algoritmos avanzadosAlgoritmos de cadenas · Matemáticas y teoría de números · Manipulación de bits · Árboles de segmentos · Union-FindAlgoritmos prácticosEstrategia para entrevistas de código · Caché LRU · Limitación de tasa · Hashing consistente
Toda la documentación de desarrollo
Comunidad
ProyectosDescubre creadores y su trabajoRegistros de desarrolloDecisiones y aprendizajesPromptsInstrucciones reutilizablesProblemas con herramientas de IAProblemas y alternativas de Claude, Codex, GeminiEscaparateResultados terminadosGuía de la comunidadCómo construimos en abierto
Colabora
Transferencia técnicaApps nativas con Rust y eguiDesarrollo de sitio web10 idiomas, cuentas, documentación y descargasDesarrollo de app de escritorioRust y egui, sin WebViewCanal de lanzamiento y pagosFirma, MSI, deb, rpm, AppImage, hashesSocio de ventasRecomiéndanos y gana el 30 %ContactoDesarrollo, alianzas e inversión
Servicios
Escritorio remotoAccede a tu ordenador desde el navegadorPaquetes de instalación a medidaSolo lo necesario, ajustes precargados
Comprar
ES
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Iniciar sesión
Iniciar sesión
TASTEDEV

De pequeñas herramientas a un mejor desarrollo.

support@tastedev.netApoyar a TASTEDEV
ProductosLínea de productosComprarDocsDescargasMarketplaceSoporte
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparate
PolíticasQuiénes somosPolítica de privacidadTérminos de servicioCondiciones de suscripciónReembolsosNormas de la comunidad
CuentaIniciar sesiónRegistrarse
Visitantes
Hoy
Ayer
Vistas totales
Empresa
GXSOFT
Representante
CHOI YOUNG GU
Número de registro mercantil
853-44-00368
Dirección
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Teléfono
+82-10-4404-1523
Correo electrónico
whitecalvin@tastedev.net
Responsable de privacidad
CHOI YOUNG GU

© 2026 TASTEDEVLa información de los productos se basa en fuentes de desarrollo verificadas.Publicado · en mejora

Documentación de Kotlin
Kotlin
Getting StartedSyntax BasicsTypes and DataModules and PackagesErrors and TestingKey Concepts
Debates

Guía de Kotlin · 1/6

Getting Started

Por ahora, este capítulo solo está disponible en inglés.

Kotlin is a statically typed language from JetBrains. It most often runs on the JVM, compiling to the same bytecode as Java, so every Java library is available to you. It is also the preferred language for Android and is used for backends and multiplatform projects. This chapter shows three ways to run your first program: the browser-based Playground, the command-line compiler, and a Gradle project in IntelliJ IDEA.

Try it in the browser

The Kotlin Playground runs code without installing anything. You can switch the compile target (JVM, JS, Wasm and others), pick a compiler version, and share snippets by link. It is all you need while learning the syntax.

fun main() {
    val name = "Kotlin"
    println("Hello, $name!")
}

fun main() is the entry point. There is no wrapper class and no semicolons, and println comes from the standard library, so no import is needed.

The command-line compiler

With a JDK installed, kotlinc compiles a single file. SDKMAN! or Homebrew are the easiest installers on macOS and Linux; on Windows, download the archive from the Kotlin GitHub releases page and add its bin folder to your PATH.

# install (pick one)
sdk install kotlin
brew install kotlin

# compile and run
kotlinc hello.kt -include-runtime -d hello.jar
java -jar hello.jar

-include-runtime bundles the Kotlin standard library into the JAR; without it, you would have to put the library on the classpath yourself. The bare compiler is great for understanding what happens under the hood, but real projects use a build tool.

IntelliJ IDEA

Since JetBrains created Kotlin, IntelliJ IDEA has the deepest support, and Kotlin tooling is included in the free edition. For Android work, use Android Studio, which is built on IntelliJ. To create a project:

  1. Choose New Project, then Kotlin as the language and Gradle as the build system.
  2. Select Kotlin as the Gradle DSL, so the build script is build.gradle.kts.
  3. Pick a JDK and click Create. A sample file appears under src/main/kotlin.
  4. Click the run icon in the gutter next to main.

A Gradle project with the Kotlin DSL

You can also scaffold a project from the terminal. gradle init asks questions interactively, or you can answer them up front with flags:

mkdir hello-kotlin && cd hello-kotlin
gradle init --type kotlin-application --dsl kotlin
./gradlew run

gradlew (gradlew.bat on Windows) is the Gradle Wrapper. It downloads the Gradle version pinned by the project, so everyone on the team builds with the same one. The generated build script looks roughly like this:

¿Tienes preguntas sobre este capítulo?
Capítulo siguienteSyntax Basics
// app/build.gradle.kts
plugins {
    alias(libs.plugins.kotlin.jvm)
    application
}

repositories {
    mavenCentral()
}

dependencies {
    testImplementation(kotlin("test"))
}

application {
    mainClass.set("org.example.AppKt")
}

The Kotlin DSL lets you write build scripts in Kotlin itself. It does the same job as a Groovy build.gradle, but you get code completion and type checking in the IDE. The kotlin.jvm plugin compiles your sources, application adds the run task, and plugin and library versions live in the version catalog at gradle/libs.versions.toml.

Where main ends up

AppKt in mainClass is not a typo. On the JVM, top-level functions are compiled into static methods of a class named after the file plus Kt. So main in App.kt inside package org.example becomes org.example.AppKt.main.

// app/src/main/kotlin/org/example/App.kt
package org.example

fun main(args: Array<String>) {
    if (args.isEmpty()) {
        println("No arguments given")
    } else {
        println("First argument: ${args[0]}")
    }
}

Pass arguments with ./gradlew run --args="hello world". If you don't need them, a plain fun main() works too.

Summary

  • The Kotlin Playground lets you practice without installing anything.
  • kotlinc is handy for single-file experiments; Gradle is for real projects.
  • Start new projects with Gradle and the Kotlin DSL (build.gradle.kts) and run them with ./gradlew run.
  • A top-level main is the entry point, compiled on the JVM into a class named after the file plus Kt.

0 comentarios

Comentarios destacadosMás recientes primero

Iniciar sesión · Inicia sesión para dejar un comentario.