Recently I have completed the course Kotlin for Java Developers by JetBrains. I think it is really useful so I want to share the learning experience with developers on the Internet, who might run into this post and find something helpful for their learning as well. This post will provide my insight into the course and also give the solutions to completing many coding assignments.
What drives me to this course?
I have been coding Android apps with Java for some years. However, I must admit that Java is obviously no longer the preferred language for Android development in the face of a newer, more concise and efficient Kotlin. I have also wasted some good opportunities because of the lack of Kotlin proficiency. But more importantly and practically, I am in the process of migrating the entire codebase of the Essay King app to Kotlin; thus this course would definitely help to gain a deeper understanding and nuances of this language.
What is Kotlin for Java Developers?
Kotlin for Java Developers is a comprehensive course by JetBrains that teaches Java developers how to leverage their existing Java knowledge to learn Kotlin. The course provides an in-depth introduction to the Kotlin language, covering key features such as null safety, lambdas, and coroutines, and demonstrates how to write concise and expressive code in Kotlin. With hands-on coding exercises and quizzes, the course is designed to help Java developers build a strong foundation in Kotlin and transition smoothly to the language. Whether you are an experienced Java developer or just getting started, Kotlin for Java Developers is a valuable resource for learning Kotlin.
That being said, I would recommend taking this course only when you already had experience with programming. The course works best when you aim to transition/broaden your skill from a Java background.
Who creates and teaches this course?
When choosing a course to study, I always prioritise the best source. I chose the Kotlin course taught by JetBrains mainly because they are the creator of the Kotlin language itself. The company from Cech Republic is also widely known as the creator of the IntelliJ IDEA which all Java developers must know.
In this course, you will be guided by two instructors: Svetlana Isakova and Andrey Breslav, both of them are very supportive and knowledgeable. Svetlana has a unique English accent that I find quite hard to catch up with initially but you will gradually find it really cool :D. And of course, what more important is that the instructors deliver the lessons nicely.
Course content: What will you learn?
You will go through 5 weeks of learning, with particular focuses as follows:
Week 1
- List the key characteristics of Kotlin
- Understand the types of tasks where Kotlin can be used
Week 2
- Convert Java code to Kotlin automatically
- Define variables and functions
- Use control structures
- Employ ranges
- Explain what is an extension function in Kotlin
- Define and use extensions
Week 3
- Distinguish nullable types and non-nullable types
- Use different ways to perform an action only when a value of a nullable type is not null
- Prefer safe operations for nullable values
- Employ functional programming style for manipulating collections
- Use function types
- Choose the right form of return expression for returning from lambda
Week 4
- Distinguish between different kinds of properties: without backing field, lazy, lateinit
- Summarize the differences in defining and using classes with Java
- Know the different syntax for constructors
- Use different kinds of classes for correct situations: enum, data, inner, sealed
- Use annotations to improve Java interoperability
- Explain the difference between object expression and object declaration
- Show the benefits of companion objects over static methods
- Give examples of using conventions in the standard library
- Employ conventions for your own classes
Week 5
- Use short simple function from the standard library
- Explain why simple library functions bring no performance overhead
- Demonstrate how inlining works
- Describe the difference between operations on Collections and operations on Sequences
- Convert a chained call from Collections to Sequences
- Recognize lambdas with receiver in the code: in the standard library and different DSLs
- Illustrate in what sense lambdas with receiver are similar to extensions
- Show the Kotlin type hierarchy
- Explain the difference between Unit and Nothing types
- Recognize platform types: the types that came from Java
- Prevent NPEs for mixed Kotlin and Java code
My learning experience
I totally believe that this is a great course. What I found most valuable is the challenging exercises, which require hands-on practice on Android Studio. Unlike many other Coursera courses in which you are evaluated by peers, this course allows you to submit and get automatically graded on Android Studio. All you need for submission is a working solution, Android Studio or Intellij IDEA, and the token from your Coursera account. You will receive instructions on how to install the plugin for the course on Android Studio
It is worth mentioning that this is not a beginner-level course. The exercises are more challenging than other Kotlin crash courses but don’t worry, with determination we can surely master it. The most exciting project is located in Week 5, when you build and implement the famous Game 2048 in Kotlin
Below is the list of my GitHub repositories which contains the solution source code for all programming assignments of the course
- Week 2: https://github.com/maixuanlinh/Kotlin-Jetbrains-Week2
- Week 3: https://github.com/maixuanlinh/Kotlin-JetBrains-Week3
- Week 4: https://github.com/maixuanlinh/Kotlin-JetBrains-Week4
- Week 5: https://github.com/maixuanlinh/Kotlin-JetBrains-Week5
Conclusion
I hope this post has provided you with useful information about the course “Kotlin for Java Developers” by JetBrains. I hope that the solution code above gives you useful references and helps you complete this certificate, although I would recommend working it out on your own until you are really stuck.
If you find this post helpful, please give it a “heart” and feel free to leave a comment whenever you want to clarify more details.
Most Commented Posts