1. Introduction
Introduction
()
What is Kotlin?
()
Installing IntelliJ
()
Configuring IntelliJ
()
2. Working with Strings
Creating a new Kotlin project
()
Variable declaration syntax
()
Inferring variable types and println
()
Using string templates
()
Multiple line strings
()
3. Other Variable Types
Using the Double type and determining class types
()
The Int data type
()
Other data types
()
Casting in Java
()
Casting in Kotlin
()
Chapter review
()
4. Nullable Variables
Creating variables that can contain a null value
()
Methods that work with nullable parameters
()
The null-safe and non-null asserted operators
()
The Nothing object type
()
5. Functions
The function syntax and the Unit object
()
Creating and calling top-level functions
()
Single expression functions
()
Using named parameters and optional parameters
()
Other aspects of functions in Kotlin
()
6. Classes
Project structure and packages
()
The class declaration and class-level attributes
()
Instantiating a class and accessing class-level attributes
()
Creating a simple constructor
()
Secondary constructors
()
Alternative class design
()
Overriding getters and setters
()
Functions within a class
()
Static functions
()
Data classes
()
7. Practical Exercise 1
Explaining the challenge
()
Solution walk-through
()
8. If and Object Equality
The if keyword as an expression
()
Using if to do a null-safe check
()
The let function
()
Object equality and the when expression
()
9. Ranges and Looping
The while loop
()
Using for to loop through a collection
()
Destructuring with a for loop
()
Looping with a range
()
10. Collections
Mutable collections with immutable variables
()
Immutable lists
()
Mutable lists
()
Maps and sets
()
Working with arrays
()
11. Practical Exercise 2
Explaining the challenge
()
Solution walk-through
()
12. Exceptions and the try-catch Block
Exceptions are unchecked
()
Throwing exceptions
()
try as an expression
()
use as an expression (try with resources)
()
13. Testing
Using JUnit with Kotlin
()
The Kotlin test assertions
()
Testing for exceptions
()
14. Polymorphism and Inheritance
Creating and implementing interfaces
()
Class inheritance
()
Creating custom exceptions
()
Extension functions
()
15. Java Interoperability
Instantiating classes and providing values to non-nullable variables
()
Using data classes
()
Using immutable lists
()
Exception handling
()
Using static functions
()
Importing a Kotlin JAR file into a Java project
()
16. Getting Started with Spring Boot
Creating a project with the Spring Initializr
()
A hello world controller
()
Auto-restarting an application
()
Overview of the case study
()
Creating views and backing beans
()
Connecting views to controller functions
()
Adding services
()
Posting to a controller
()
Dependency injection
()
Revisiting backing beans
()
17. Functional Programming
Functional programming overview
()
Methods that take function parameters—the Java way
()
Methods that take function parameters—the Kotlin way
()
Functional programming with lists
()
filter and flatMap
()
reduce and fold
()
Working with maps
()
18. Getting Started with Hibernate
Adding the Hibernate dependencies
()
The challenge of creating entities
()
Persisting data to a database
()
19. Practical Exercise 3
Step 1: Explaining the challenge
()
Solution walk-through
()
Mappings between entities
()
Upgrading the view
()
Step 2: Explaining the challenge
()
Solution walk-through
()
Step 3: Explaining the challenge
()
Solution walk-through
()
20. Reflection
The concept of reflection
()
Inspecting properties and functions
()
A practical use for reflection
()
Thank you and goodbye
()
Ex_Files_Spring_Boot_Kotlin.zip
(1.0 MB)