In this article, I will explain Block Commands in Scratch 3.0. Basically, the block commands in Scratch represent the coding blocks. In fact, we have nine different categories of block commands. The following list shows these nine block commands. Motion Looks Sound Events Control Sensing Operators Variables My Blocks The following section describes each set …
Constructors in Kotlin
Basically, the constructors in Kotlin can be categorized as the Primary Constructor and the Secondary Constructors. In other words, a class in Kotlin can have a primary constructor and one or more secondary constructors. Creating Constructors in Kotlin While a class in Kotlin can have one primary constructor, it can include several secondary constructors. For the purpose of creating secondary constructors, …
Getting Started with Scratch 3.0
In this article on Getting Started with Scratch, I will explain the basics of Scratch 3.0 programming. Basically, Scratch 3.0 was released on January 2, 2019. Scratch 3.0 Environment In order to Getting Started with Scratch 3.0, just go to its official website https://scratch.mit.edu/ and sign in if you have already joined it. Otherwise, click on the Join …
Creating Classes in Kotlin
In this article, I will explain how to create Classes in Kotlin. Like other programming languages, the class keyword is used to define a class in Kotlin. Moreover, classes in Kotlin can have properties, methods, and constructors as its members. The following code shows the syntax of creating classes in Kotlin. Unlike Java, it is not mandatory to have …
Variable Declaration in Kotlin
In this article, I will demonstrate several examples of the Variable Declaration in Kotlin. As a matter of fact, Kotlin was developed for Java Virtual Machine (JVM). Therefore Java and Kotlin are interoperable. Further, Kotlin has been used for Android app development. In general, Kotlin creates variables in two ways – using the val, and var keywords. …
Get Started with Kotlin Programming Language
In order to Get Started with Kotlin, first, you need to install the latest version of IntelliJ IDEA. So, choose the Community download and save the exe file. After that, click on the exe file that you have just downloaded and follow the installation instruction. Once, it is installed, you can open the IntelliJ IDEA. The following interface will be shown …
Features of Kotlin to Build Better Apps
In general, there are many features of Kotlin that will motivate you to adopt Kotlin as the programming language in Android development. Evidently, in 2017 Google announced its support of Kotlin as the language to develop Android apps. Since then along with Java Kotlin has been used in Android development. In fact, you need to …
Interfaces in Java
Interfaces in Java provide us a way to declare the functionality that can be implemented by different classes in their own way. In general, an interface represents a contract. Basically, it is a contract between different groups of people in the software industry where the groups want to agree on how the software should behave. Therefore, the …
Creating Arrays in Java
In this article, I will explain Creating Arrays in Java. To begin with, let us first understand what an array is. Basically, an array represents a collection of elements. So, an array can contain multiple values of the same data type. Additionally, all elements in an array occupy the contiguous locations in memory. Further, all …
Examples of For-each Loop in Java
This article demonstrates several Examples of For-each Loop in Java. In fact, the use of for-each loop makes traversing the elements of a collection much simplified. The following code shows a simple example of displaying the elements of an array using the for-each loop. As can be seen, there is no loop control variable to …