- It isa modern programming
language
- It brings together the powerful
capabilities of di
ff
erent
programming languages
- Help developers be more
productive and less verbose
- The compiler does a lot of work
for you
- It is fun to learn and work with
WHYKOTLIN
- Two keywordsto declare
variables
- val: immutable reference
- var: mutable reference
- Semicolons are optional 🎉
- Type annotations may come
after the name
VARIABLES
KOTLINFORJAVADEVS
31.
- The ==operator calls equals
under the hood
- The === operator is used for
reference equality
EQUALITY
KOTLINFORJAVADEVS
32.
- Kotlin supportnullable types
by putting a question mark
after the type name
- Putting the question mark
explicitly allows the variable to
contain null
NULLSAFETY
KOTLINFORJAVADEVS
33.
- Kotlin providesa simple way to
generate data classes that
include the following methods
- equals
- hashCode
- toString
- copy
DATACLASSES
KOTLINFORJAVADEVS
34.
- An expressionis a variable,
operators, explicit values,
functions that evaluate to a
single value
- Some notable are the if, when
and try expressions
EXPRESSIONS
KOTLINFORJAVADEVS