Day: May 4, 2021

Kotlin tutorial for Beginners – Kotlin Companion Objects

Kotlin Companion Objects In this article, you will learn to create and use companion objects in your Kotlin program with the help of examples. Before taking about companion objects, let’s take an example to access members of a class. class Person{ fun callMe() = println(“I’m called.”) } fun main(args: Array<String>) { val p1 = Person() …

Kotlin tutorial for Beginners – Kotlin Object Declarations and Expressions

Kotlin Object Declarations and Expressions In this article, you will learn about object declarations (singletons) and object expressions with the help of examples. Object Declarations Singleton is an object-oriented pattern where a class can have only one instance (object). For example, you are working an application having SQL database backend. You want to create a …

Kotlin tutorial for Beginners – Kotlin Interfaces

Kotlin Interfaces In this article, you will learn about interfaces and how to implement it in Kotlin with the help of examples. Kotlin interfaces are similar to interfaces in Java 8. They can contain definitions of abstract methods as well as implementations of non-abstract methods. However, they cannot contain any state. Meaning, interface may have …

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.  Dropout_Regularization_on_the_Visible_Layer 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 Series Forecasting …

Kotlin tutorial for Beginners – Kotlin Abstract Class

Kotlin Abstract Class In this article, you will learn about abstract class and how to implement it in Kotlin (with the help of examples). Like Java, abstract keyword is used to declare abstract classes in Kotlin. An abstract class cannot be instantiated (you cannot create objects of an abstract class). However, you can inherit subclasses from …

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 …