Comments in Kotlin are identical to those in Java with one exception. Learn about that difference and why it matters.
- [Narrator] Comments in Kotlin are just like those in Java.…There are two basic forms, end of line…and block comments.…An end of line comment begins with two forward slashes…and lasts until the end of the line.…The block comment can span multiple lines.…It begins with a forward slash and an asterisk…and ends with an asterisk and a forward slash.…Everything in between the beginning…and the end of the comment is commented out.…
Unlike in Java, block comments can be nested,…meaning you can wrap an inner comment…with an outer one.…This can be handy when you need to comment out…a block of code that already contains comments.…Here is a meaningless function…with block comments already in it.…We can comment this whole entire block out…by simply putting another set…of block comments around it.…
In Java, you would have to remove the inner set…of comments in order to avoid errors.…
Author
Released
7/18/2017- Kotlin as a better Java
- Setting up a Kotlin programming environment
- Val vs. var
- Understanding basic Kotlin programming concepts
- Object-oriented programming
- Using Java from Kotlin
- Using Kotlin from Java
- Annotations, reflection, and DSL construction
- Functional programming in Kotlin
Skill Level Advanced
Duration
Views
Related Courses
-
Learning Kotlin for Android Development
with Kevin Moore1h 1m Intermediate -
Code Clinic: Java
with Patrick Royal1h 33m Intermediate -
Learning JavaFX GUI Development
with Peggy Fisher2h 13m Intermediate -
Java: Testing with JUnit
with Peggy Fisher1h 10m Intermediate -
Java Platforms Compared: SE vs EE vs ME
with Peggy Fisher25m 38s Intermediate
-
Introduction
-
Welcome56s
-
-
1. Kotlin as a Better Java
-
Why a new JVM language?1m 35s
-
-
2. Get Started with Kotlin
-
Online2m 55s
-
IntelliJ IDEA3m 34s
-
-
3. Basic Kotlin Programming
-
Val vs. var1m
-
Type system5m 18s
-
Comments1m 16s
-
Control flow – if4m 9s
-
Control flow – when7m 10s
-
Functions6m 33s
-
Packages1m
-
-
4. Object-Oriented Programming
-
Classes5m 38s
-
Objects4m 45s
-
Interfaces5m 29s
-
Generics6m 16s
-
-
5. Java Interop
-
Use Java from Kotlin5m 54s
-
Use Kotlin from Java5m 10s
-
-
6. Advanced Kotlin Features
-
Operator overloading4m 35s
-
Annotations1m 57s
-
Reflection3m 28s
-
DSL construction10m 15s
-
Destructuring5m 41s
-
-
7. Functional Programming in Kotlin
-
Functional programming1m 3s
-
Lambdas6m 27s
-
Closures3m 17s
-
Method chaining7m 1s
-
funKTionale library5m 18s
-
Composition4m 27s
-
Currying2m 53s
-
Partial application4m 15s
-
Memoization6m
-
-
Conclusion
-
Next steps59s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Comments