BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

Kotlin Sealed Class with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

A sealed class is used for representing restricted class hierarchy where an object or a value can have one of the types from a limited… [Read More]

Kotlin Data Class with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

In Kotlin, you can create a data class to hold the data. The reason why would you want to mark a class as data is… [Read More]

Kotlin Nested and Inner Class with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

In this guide, you will learn about nested and inner class in Kotlin with the help of examples. Kotlin Nested Class When a class is… [Read More]

Kotlin Interfaces with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

In this guide, we will learn about interfaces. Similar to an abstract class, an interface cannot be instantiated because it doesn’t have any constructor. Points… [Read More]

Kotlin Abstract Class with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

An abstract class cannot be instantiated, which means we cannot create the object of an abstract class. Unlike other class, an abstract class is always… [Read More]

Kotlin Visibility Modifiers – public, private, protected and internal

By Chaitanya Singh | Filed Under: Kotlin Tutorial

Visibility modifiers restrict the access of classes, interfaces, functions, properties, constructors etc. to a certain level. In kotlin we have four visibility modifiers – public,… [Read More]

Kotlin Inheritance with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

Inheritance is a feature using which a class inherits all the features of another class. The class from which the features are inherited is known… [Read More]

Kotlin Constructors with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

The main purpose of constructor is to initialize the properties of a class. Constructor is called when we create the object of a class. In… [Read More]

Kotlin Class and Objects – Object Oriented Programming (OOP)

By Chaitanya Singh | Filed Under: Kotlin Tutorial

Kotlin is an object oriented programming language just like Java. Object oriented programming (OOP) allows us to solve the complex problem by using objects. In… [Read More]

Kotlin Try as an expression in Exception handling

By Chaitanya Singh | Filed Under: Kotlin Tutorial

The try block in Kotlin can work as an expression. It can return a value just like any other expression, the returned value can be… [Read More]

Kotlin throw keyword with example

By Chaitanya Singh | Filed Under: Kotlin Tutorial

In this short guide, we will learn how to throw a exception using throw keyword in Kotlin. Kotlin throw keyword example In the following example… [Read More]

Kotlin Nested Try-Catch Block with example

By Chaitanya Singh | Filed Under: Kotlin Tutorial

When a try catch block is present inside another try catch block then it is called nested try catch block. If any exception occurs in… [Read More]

Kotlin Multiple Catch Blocks with example

By Chaitanya Singh | Filed Under: Kotlin Tutorial

A try block can have multiple catch blocks. When we are not sure what all exceptions can occur inside the try block then it is… [Read More]

Kotlin Try Catch with example

By Chaitanya Singh | Filed Under: Kotlin Tutorial

In the last tutorial we learned what is an exception handling. In this guide we will see various examples of try catch block. We will… [Read More]

Kotlin Exception Handling with examples

By Chaitanya Singh | Filed Under: Kotlin Tutorial

Exceptions are unwanted issues that can occur at runtime of the program and terminate your program abruptly. Exception handling is a process, using which we… [Read More]

  • 1
  • 2
  • 3
  • Next Page »

Copyright © 2012 – 2022 BeginnersBook . Privacy Policy . Sitemap