Java offers a surprising variety of ways to initialize a list. Choosing the right one depends on whether you need to modify the data later or if you want to ensure the list remains "read-only." Here are 8 common methods to get the job done, categorized by their mutability.
In this article, we’ll discuss all that entails KDoc in Kotlin. KDoc is simply a language used to document code written in Kotlin specifically. KDoc allows us to provide documentation comments for classes, functions, properties and other elements in our code. It’s the same as Javadoc which is used to document JAVA language. Essentially, KDoc combines syntax in Javadoc for the block tags and markdown for inline markup.