Monday 13 November 2017

Kotlin for Beginners

Kotlin Basics

      Introduction to Kotlin
      Install Kotlin
            Installing Kotlin in command line mode
            Install kotlin using brew command
      Hello World program
      Setting up Kotlin in Eclipse
      Variables

Data types

      Data types
      nullable types
      Numbers
      Characters
      Convert character to Int
      Booleans
      Strings
      String template expressions

Arrays

      Arrays
      Define Array of nulls
      Define array using factory function
      Print array elements

Operators, Control flow statements

      Bit wise operators
      Logical Operators
      === vs ==
      Control flow statements
      if statement
      if-else statement
      if-else if-else
      Why there is no ternary operator in kotlin?
      when expression
      Using when as if-else if ladder
      Use When as expression
      for loop
      while, do-while loops
      break statement
      continue statement

Working with classes

      Classes and objects
      Declaring properties
      getters & setters
      Define member functions of class
      initialize member properties
      const: Compile time constants
      const vs val
      Late initialized properties
      Body of the class is optional
      Constructors
      Is Kotlin class requires body?
      Secondary Constructors
      Passing default values to primary constructor
      Default constructor
      Define private primary constructor
      How to create Object
      Any: Super class of all classes
      Inheritance
      Overriding methods
      Overriding properties
      Calling super class methods
      Nested classes
      Inner classes
      Interfaces
      Overriding conflict while implementing interfaces
      Object Expressions
      Define singleton objects
      Companion Objects
      Anonymous Inner classes
      Access super class of outer class from inner class
      Abstract classes
      ?.: Safe call operator: handle nullable types
      ?: Elvis operator

Functions

      Functions
      Call functions using parameter names
      Function default arguments
      varargs : Variable number of arguments
      unit (or) void functions
      Single Expression functions
      infix functions
      Local functions
      Member functions
      Tail recursive functions
      Higher Order function
      Lambda Expressions
      Anonymous functions

Packages, extensions, data classes and Generics

      Packages
      Access specifiers
      Extensions
      Extensions to companion object
      Scope of extension functions
      Declare extensions as members of other class
      Overriding extensions
      Data classes
      Data Classes: copy function
      Data classes: Destructuring declarations
      Generics

Previous                                                 Next                                                 Home

No comments:

Post a Comment