更新时间:2021-08-27 20:00:54
封面
Title Page
Copyright and Credits
Kotlin Programming By Example
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
The Fundamentals
Getting started with Kotlin
JDK installation
Installation on Windows
Installation on macOS
Installation on Linux
Compiling Kotlin programs
Working with the command-line compiler
Installing the command-line compiler on macOS
Homebrew
MacPorts
Installing the command-line compiler on Linux
SDKMAN!
Installing the command-line compiler on Windows
Running your first Kotlin program
Writing scripts with Kotlin
Using the REPL
Working with an IDE
Installing IntelliJ IDEA
Setting up a Kotlin project with IntelliJ
The fundamentals of the Kotlin programming language
Kotlin basics
Variables
Variable scope
Local variables
Operands and operators
Types
Int
Float
Double
Boolean
String
Char
Array
Functions
Declaring functions
Invoking functions
Return values
The function naming convention
Comments
Single-line comments
Multiline comments
Doc comments
Controlling program flow
Conditional expressions
The if expression
The when expression
The Elvis operator
Loops
The for loops
The while loops
The break and continue keywords
The do…while loops
Packages
The import keyword
Object-oriented programming concepts
Introduction
Working with classes
Creating objects
Companion objects
Properties
Advantages of Kotlin
Developing Android applications with Kotlin
Setting up Android Studio
Building your first Android application
Creating a user interface
Running the application
Fundamentals of the web
What is the web?
Hypertext Transfer Protocol
Clients and servers
HTTP requests and responses
HTTP methods
Summary
Building an Android Application – Tetris
Android – an overview
Application components
Activities
Intents