Category Archives: Kotlin tutorials

Kotlin tutorials category is made for beginners and for experts as well. To start learning kotlin this tutorial could be a good start.
But first let’s talk a little bit about kotlin.

What is Kotlin all about?

It is a new programming language targeting the Java platform. Kotlin is concise, safe, pragmatic, and focused on interoperability with Java code. It can be used almost everywhere Java is used today.

  • For server-side development
  • Android apps
  • JavaScript
  • Native
    • Kotlin/Native is a technology for compiling Kotlin code to native binaries, which can run without a virtual machine.

Kotlin works great with all existing Java libraries and framworks and runs with the same level of performance as Java.

Target platforms: Server-side, Android, anywhere Java runs

The primary goal of Kotlin is to provide a more concise, more productive, safer alternative to Java that’s suitable in all contexts where Java is used today. Java is an extremly popular language, and it is used in a broad variety of environments, from smart cards to the largest data centers run by Google, Twitter, LinkedIn, and other internet-scale companies. In most of these places, using Kotlin can help developers achieve their goals with less code and fewer annoyances along the way.

The most common areas to use Kotlin are

  • Building server-side code (typically, backends of web applications)
  • Building mobile applications that run on Android devices

In addition to Java, Kotlin can be compiled to JavaScript, allowing you to run Kotlin code in the browser.

Literal Constants

Kotlin constants are fixed values that does not change during program execution.
These fixed values are called literals.

Kotlin constatns can be of any basic data types.

  • Integer constants
  • Floating point constants
  • Character constants
  • String literals etc.
Octal literals (numbers in base 8) are not supporte in Kotlin

Continue reading Literal Constants

Follow and like us:

Characters and Strings

Kotlin characters and strings are exactly the same things as Java strings. You can pass a char/string created in Kotlin code to any Java method, and you can use any Kotlin standard library methods on chars/strings that you receive from Java code. No conversion is involved, and no additional wrapper ojbects are created.

Continue reading Characters and Strings

Follow and like us: