Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring Boot 2.0 Projects

You're reading from   Spring Boot 2.0 Projects Build production-grade reactive applications and microservices with Spring Boot

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781789136159
Length 336 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mohamed Shazin Sadakath Mohamed Shazin Sadakath
Author Profile Icon Mohamed Shazin Sadakath
Mohamed Shazin Sadakath
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introduction FREE CHAPTER 2. Building a Basic Web Application 3. Building a Simple Blog Management System 4. Introduction to Kotlin 5. Building a Reactive Movie Rating API Using Kotlin 6. Building an API with Reactive Microservices 7. Building a Twitter Clone with Spring Boot 8. Introducing Spring Boot 2.0 Asynchronous 9. Building an Asynchronous Email Formatter 10. Assessments 11. Other Books You May Enjoy

Chapter 4, Introduction to Kotlin

  1. Yes, variables and expressions can be used inside string literals beginning with a $ sign.
  2. A nullable variable/argument can be assigned null at any point of code. However, before using, defensive code must be used to check for null safety. Kotlin has reduced the chances of NullPointerException using a nullable variable/argument. An example of a nullable variable/argument is var no : Int? = 0, which uses ? at the end of the data type.
  3. Explicit casting in Kotlin is where when a type checking is done using the is a keyword. Within the block of code that follows, there is no need to do a type casting to the destination type. Here is the following code:
var s : Any = "Shazin";
if (s is String) {
// No need to cast s of type Any to type String inside this block of code like java does using ((String) s)
// All properties and functions of String...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image