Example: marketing

Kotlin Notes for Professionals - goalkicker.com

KotlinNotes for ProfessionalsKotlin Notes for Programming BooksDisclaimerThis is an uno cial free book created for educational purposes and isnot a liated with o cial Kotlin group(s) or company(s).All trademarks and registered trademarks arethe property of their respective owners80+ pagesof professional hints and tricksContentsAbout 1 .. Chapter 1: Getting started with Kotlin 2 .. Section : Hello World 2 .. Section : Hello World using a Companion Object 2 .. Section : Hello World using an Object Declaration 3 .. Section : Main methods using varargs 4.

Kotlin Kotlin Notes for Professionals ® Notes for Professionals GoalKicker.com Free Programming Books Disclaimer This is an uno cial free book created for educational purposes and is

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Kotlin Notes for Professionals - goalkicker.com

1 KotlinNotes for ProfessionalsKotlin Notes for Programming BooksDisclaimerThis is an uno cial free book created for educational purposes and isnot a liated with o cial Kotlin group(s) or company(s).All trademarks and registered trademarks arethe property of their respective owners80+ pagesof professional hints and tricksContentsAbout 1 .. Chapter 1: Getting started with Kotlin 2 .. Section : Hello World 2 .. Section : Hello World using a Companion Object 2 .. Section : Hello World using an Object Declaration 3 .. Section : Main methods using varargs 4.

2 Section : Compile and Run Kotlin Code in Command Line 4 .. Section : Reading input from Command Line 4 .. Chapter 2: Basics of Kotlin 6 .. Section : Basic examples 6 .. Chapter 3: Strings 7 .. Section : String Equality 7 .. Section : String Literals 7 .. Section : Elements of String 8 .. Section : String Templates 8 .. Chapter 4: Arrays 9 .. Section : Generic Arrays 9 .. Section : Arrays of Primitives 9 .. Section : Create an array 9 .. Section : Create an array using a closure 9 .. Section : Create an uninitialized array 9.

3 Section : Extensions 10 .. Section : Iterate Array 10 .. Chapter 5: Collections 11 .. Section : Using list 11 .. Section : Using map 11 .. Section : Using set 11 .. Chapter 6: Enum 12 .. Section : Initialization 12 .. Section : Functions and Properties in enums 12 .. Section : Simple enum 12 .. Section : Mutability 12 .. Chapter 7: Functions 14 .. Section : Function References 14 .. Section : Basic Functions 15 .. Section : Inline Functions 16 .. Section : Lambda Functions 16 .. Section : Operator functions 16 .. Section : Functions Taking Other Functions 17.

4 Section : Shorthand Functions 17 .. Chapter 8: Vararg Parameters in Functions 18 .. Section : Basics: Using the vararg keyword 18 .. Section : Spread Operator: Passing arrays into vararg functions 18 .. Chapter 9: Conditional Statements 19 .. Section : When-statement argument matching 19 .. Section : When-statement as expression 19 .. Section : Standard if-statement 19 .. Section : If-statement as an expression 19 .. Section : When-statement instead of if-else-if chains 20 .. Section : When-statement with enums 20 .. Chapter 10: Loops in Kotlin 22.

5 Section : Looping over iterables 22 .. Section : Repeat an action x times 22 .. Section : Break and continue 22 .. Section : Iterating over a Map in Kotlin 23 .. Section : Recursion 23 .. Section : While Loops 23 .. Section : Functional constructs for iteration 23 .. Chapter 11: Ranges 25 .. Section : Integral Type Ranges 25 .. Section : downTo() function 25 .. Section : step() function 25 .. Section : until function 25 .. Chapter 12: Regex 26 .. Section : Idioms for Regex Matching in When Expression 26 .. Section : Introduction to regular expressions in Kotlin 27.

6 Chapter 13: Basic Lambdas 30 .. Section : Lambda as parameter to filter function 30 .. Section : Lambda for benchmarking a function call 30 .. Section : Lambda passed as a variable 30 .. Chapter 14: Null Safety 31 .. Section : Smart casts 31 .. Section : Assertion 31 .. Section : Eliminate nulls from an Iterable and array 31 .. Section : Null Coalescing / Elvis Operator 31 .. Section : Nullable and Non-Nullable types 32 .. Section : Elvis Operator (?:) 32 .. Section : Safe call operator 32 .. Chapter 15: Class Delegation 34.

7 Section : Delegate a method to another class 34 .. Chapter 16: Class Inheritance 35 .. Section : Basics: the 'open' keyword 35 .. Section : Inheriting fields from a class 35 .. Section : Inheriting methods from a class 36 .. Section : Overriding properties and methods 36 .. Chapter 17: Visibility Modifiers 38 .. Section : Code Sample 38 .. Chapter 18: Generics 39 .. Section : Declaration-site variance 39 .. Section : Use-site variance 39 .. Chapter 19: Interfaces 41 .. Section : Interface with default implementations 41.

8 Section : Properties in Interfaces 42 .. Section : super keyword 42 .. Section : Basic Interface 42 .. Section : Conflicts when Implementing Multiple Interfaces with Default Implementations 43 .. Chapter 20: Singleton objects 44 .. Section : Use as replacement of static methods/fields of java 44 .. Section : Use as a singleton 44 .. Chapter 21: coroutines 45 .. Section : Simple coroutine which delay's 1 second but not blocks 45 .. Chapter 22: Annotations 46 .. Section : Meta-annotations 46 .. Section : Declaring an annotation 46.

9 Chapter 23: Type aliases 47 .. Section : Function type 47 .. Section : Generic type 47 .. Chapter 24: Type-Safe Builders 48 .. Section : Type-safe tree structure builder 48 .. Chapter 25: Delegated properties 49 .. Section : Observable properties 49 .. Section : Custom delegation 49 .. Section : Lazy initialization 49 .. Section : Map-backed properties 49 .. Section : Delegate Can be used as a layer to reduce boilerplate 49 .. Chapter 26: Reflection 51 .. Section : Referencing a class 51 .. Section : Inter-operating with Java reflection 51.

10 Section : Referencing a function 51 .. Section : Getting values of all properties of a class 51 .. Section : Setting values of all properties of a class 52 .. Chapter 27: Extension Methods 54 .. Section : Potential Pitfall: Extensions are Resolved Statically 54 .. Section : Top-Level Extensions 54 .. Section : Lazy extension property workaround 54 .. Section : Sample extending Java 7+ Path class 55 .. Section : Sample extending long to render a human readable string 55 .. Section : Sample extending Java 8 Temporal classes to render an ISO formatted string 55.


Related search queries