[Shocked] Java programmers learn Kotlin

foreword

Since Google announced Kotlin as the official language for Android development at Google IO in 2017, there has been momentum building for Kotlin.

Once the emperor and the courtier, Google has not changed, Kotlin has been favored.
insert image description here

Kotlin Help for Java Programmers

Kotlin is a new statically typed programming language used by more than 60% of professional Android developers, which can help improve productivity, developer satisfaction and code security. Not only can it reduce common coding errors, but it can also be easily integrated into existing applications. Kotlin has matured,

For Java developers, it improves development efficiency.

A class that takes 50 lines of code in Java can be written in just one line in Kotlin.

It helps you avoid all that train code (says a whole bunch of not knowing what to write)

For example you don't need to specify getters and setters,

equals() ,

hashCode()

toString() method

Kotlin can generate all of these by itself. I compared Kotlin and Java in terms of development writing productivity and writing similar code:

If you don't know Kotlin is developed by JetBrains, which is also the backend of IntelliJ IDEA, one of the most popular Java IDEs.

They are a Java tools developer and are developing IDEs like IntelliJ IDEA, PyCharm and ReSharper, all written in Java, and built Kotlin to make them more productive, but at the same time they cannot rewrite in Kotlin All code, so that's why they made Kotlin fully interoperable with Java.

Because Kotlin generates Java bytecode, you can use your favorite Java in Kotlin

Frameworks and third-party libraries, and other Java developers can also use the Kotlin framework you developed.

Kotlin has a bright future

Even in Spring, a major Java framework has started to support Kotlin since Spring 5.0. It can be seen that for Java personnel, Kotlin has a bright future.

Kotlin is a jvm language that is fully compatible with java. That is, you can use both java and kotlin in the same project. This is the only one among all mainstream jvm languages .

at last

Programmers are always on the way to learn new technologies, the more efficient they are, the more enjoyable it will be.

I have also learned Kotlin myself and have been using it again and again. If you need Kotlin materials that were not used before, you can scan the QR code to get them for free!

The Kotlin Getting Started Tutorial Guide

Chapter 1 Kotlin Getting Started Tutorial Guide

            ● 前言

img

Chapter 2 Overview

            ● 使用 Kotlin 进行服务器端开发

            ● 使用 Kotlin 进行 Android 开发

            ● Kotlin JavaScript 概述

            ● Kotlin/Native 用于原生开发

            ● 用于异步编程等场景的协程

            ● Kotlin 1.1 的新特性

            ● Kotlin 1.2 的新特性

            ● Kotlin 1.3 的新特性

img

Chapter 3 begins

            ● 基本语法

            ● 习惯用法

            ● 编码规范

img

Guess you like

Origin blog.csdn.net/Android_XG/article/details/129554717