What Will I Learn?
- You will learn how to write top level functions in Kotlin
- You will learn how to use default arguments and named parameters in Kotlin
- You will learn how to create Vararg functions with Kotlin
Requirements
- The Kotlin Compiler or The Intellij/Eclipse IDE
- A basic understanding of the JVM as a platform
- A fair understanding of functions
Difficulty
- Basic
Description
In this video tutorial, we talk about basic top level functions in Kotlin. Specifically, we cover how we can create functions with or without parameters and return types. We also look at functions that use default arguments and how we can use named parameters to increase code readability and functionality. We look at single expression functions with inferred return types. We also look at Vararg Functions which let us create functions with a variable amount of arguments.
Video Tutorial
Curriculum
- Intro to Kotlin (Basic Types, Type Inference, Casting and Strings)
- Intro to Kotlin (Basic Operations and Collections)
- Intro to Kotlin (Control Flow and Conditionals)
Posted on Utopian.io - Rewarding Open Source Contributors
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you as always.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I like the vararg statement. Like you point out in the video, it can be used to drive a loop. Thanks for the look at #Kotlin.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Yeah, variadic functions (varargs) are fairly useful. They also are in the Java language but in my opinion, the Kotlin implementation is a bit better and it feels more optimized.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@tensor, Contribution to open source project, I like you and upvote.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
There is no way that you watched my content... You posted this literally 1 minute after I posted this on Utopian.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by Tensor from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @tensor I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit