Christian Woerz

Route from Java to Kotlin

What if you could eliminate NullPointerExceptions at compile time? This session shows Java developers how to write safer, more concise code with Kotlin.

Route from Java to Kotlin
#1about 3 minutes

Introduction to Kotlin and its Java interoperability

Kotlin is a mature, multi-paradigm language that is fully interoperable with Java libraries and is used in production by major companies.

#2about 5 minutes

Defining variables and working with strings in Kotlin

Learn Kotlin's basic syntax for variables using `var` and `val`, how type inference simplifies code, and how to use string templates for concatenation.

#3about 5 minutes

Using expressions instead of statements for cleaner code

Kotlin treats control flow structures like `if-else`, `try-catch`, and the powerful `when` block as expressions that return a value, eliminating temporary variables.

#4about 7 minutes

Writing concise functions with named and default arguments

Simplify function definitions using expression bodies for single-line returns and avoid method overloading by using named and default arguments.

#5about 5 minutes

Iterating with loops, ranges, and collections

Use Kotlin's intuitive syntax for `for` loops with ranges (`..`, `until`, `downTo`) and iterate over immutable lists with index destructuring.

#6about 8 minutes

Achieving null safety with nullable types and operators

Prevent null pointer exceptions by using Kotlin's type system, which distinguishes between nullable and non-nullable types, along with the safe call (`?.`) and Elvis (`?:`) operators.

#7about 5 minutes

Applying functional programming with lambdas and collections

Define and use lambdas with a concise syntax, leveraging the implicit `it` parameter and trailing lambda syntax for clean collection operations like `filter`.

#8about 4 minutes

Extending existing classes with extension functions

Add new functionality to any existing class, including final Java classes, without using inheritance by defining extension functions.

#9about 4 minutes

Understanding classes, data classes, and operator overloading

Use `data class` to automatically generate `equals`, `hashCode`, and `toString`, and learn how operator overloading can create more readable code for types like `BigDecimal`.

#10about 11 minutes

Audience Q&A on Kotlin features and learning resources

The speaker answers audience questions about Kotlin's relationship to Scala, the potential dangers of operator overloading, and recommended learning resources.

Related jobs
Jobs that call for the skills explored in this talk.

asasd

Expire

Remote
Junior

d

Saby Company
Delebio, Italy

Junior

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
CH
Chris Heilmann
WeAreDevelopers LIVE days are changing - get ready to take part
Starting with this week's Web Dev Day edition of WeAreDevelopers LIVE Days, we changed the the way we run these online conferences. The main differences are:Shorter talks (half an hour tops)More interaction in Q&AA tips and tricks "Did you know" sect...
WeAreDevelopers LIVE days are changing - get ready to take part
BB
Benedikt Bischof
Using Java 17 latest features in real world projects
Welcome to this issue of the WeAreDevelopers Live Talk series. This article recaps an interesting talk by Ron Veen who introduced the audience to some of the most interesting features that got added to the Java language.About the speaker:Ron is a hig...
Using Java 17 latest features in real world projects
BB
Benedikt Bischof
Java Basics
In 1991,James Gosling invented a high-level, general-purpose, object-oriented andsecure programming language and called it OAK (after a tree in front of hiswindow). And four years later, in 1995, it was renamed after one of the GreaterSunda Islands: ...
Java Basics

From learning to earning

Jobs that call for the skills explored in this talk.