Tag Archives: Kotlin example

Kotlin tutorial for Beginners – Kotlin Visibility Modifiers

Kotlin Visibility Modifiers In this article, you will learn about all 4 visibility modifiers in Kotlin and how they work in different scenarios. Visibility modifiers are keywords that set the visibility (accessibility) of classes, objects, interface, constructors, functions, properties and their setters. (You cannot set visibility modifier of getters as they always take the same visibility …

Kotlin tutorial for Beginners – Kotlin Inheritance

Kotlin Inheritance In this article, you’ll learn about inheritance. More specifically, what is inheritance and how to implement it in Kotlin (with the help of examples). Inheritance is one of the key features of object-oriented programming. It allows user to create a new class (derived class) from an existing class (base class). The derived class …

Kotlin tutorial for Beginners – Kotlin Constructors

Kotlin Constructors In this article, you will learn about constructors in Kotlin (both primary and secondary constructors) as well as initializer blocks with the help of examples. A constructor is a concise way to initialize class properties. It is a special member function that is called when an object is instantiated (created). However, how they work in …

Kotlin tutorial for Beginners – Kotlin Class and Objects

Kotlin Class and Objects In this article, you’ll be introduced to Object-oriented programming in Kotlin. You’ll learn what a class is, how to create objects and use it in your program. Kotlin supports both functional and object-oriented programming. Kotlin supports features such as higher-order functions, function types and lambdas which makes it a great choice for working in functional programming …

Kotlin tutorial for Beginners – Kotlin Recursion (Recursive Function) and Tail Recursion

Kotlin Recursion (Recursive Function) and Tail Recursion In this article, you will learn to create recursive functions; a function that calls itself. Also, you will learn about tail recursive function. A function that calls itself is known as recursive function. And, this technique is known as recursion. A physical world example would be to place two parallel …

Kotlin tutorial for Beginners – Kotlin Default and Named Arguments

Kotlin Default and Named Arguments In this article, you will learn about default and named arguments with the help of examples. Kotlin Default Argument In Kotlin, you can provide default values to parameters in function definition. If the function is called with arguments passed, those arguments are used as parameters. However, if the function is …

How to setup Dropout Regularization in Keras

(How to setup Dropout Regularization in Keras) In this Learn through Codes example, How to setup Dropout Regularization in Keras in Python.  How_to_setup_Dropout_Regularization_in_Keras Python Example for Beginners Special 95% discount 2000+ Applied Machine Learning & Data Science Recipes Portfolio Projects for Aspiring Data Scientists: Tabular Text & Image Data Analytics as well as Time …

Kotlin tutorial for Beginners – Kotlin Infix Function Call

Kotlin Infix Function Call In this article, you will learn to use infix notation to call a function in Kotlin (with the help of examples). Before you learn how to create a function having infix notation, let’s explore two commonly used infix functions. When you use || and && operations, the compiler look up for or and and functions respectively, and calls them …