Home / Programming (page 3)


Kotlin ArrayList and Loops Example

Kotlin ArrayList Kotlin ArrayList is also very similar to Java Arraylist. ArrayList<T> is the resizable-array implementation of the List interface. The ArrayList class has only a few methods in addition to the methods available in the List interface. val myArrayList = arrayListOf("John", "Fred", "McKinsey", "Morgan", "Sarah") //an arraylist of my friends val newFriendList …

Read More »

OOP: What is an Interface?

Object Oriented Programming- What is an Interface

An interface is a collection of abstract methods. An abstract method is a method that is declared but contains no implementation. With or without the keyword “abstract” on every function in an interface, as long as it does not have an implementation it is still an abstract Method. When a class implements an interface, it …

Read More »

Kotlin Conditional Statements

If Statements Sometimes we may want to run our code only when a condition holds true. For example, let’s hypothetically assume that we run a bar and we only want to admit users who are 18 years old and above. in the code below we’re trying to access our code with …

Read More »

What is Object Oriented Programing?

What is Object Oriented Programming

Object Orientation is the most widely used programming paradigm there is, every major programming language uses object-oriented programming principles and that includes Java, Python, C++, C#, PHP, Swift etc and it includes Kotlin. Objected Oriented Programming (OOP) dates back to the 1980s OOP is a natural way to model software …

Read More »