├── 100 ├── src_chapt10_sect001_What_NULL_is.txt └── src_chapt10_sect002_How_Nullability_Gets_Handled_Inside_Kotlin.txt ├── 110 ├── src_chapt11_sect001_Identity_in_Kotlin.txt └── src_chapt11_sect003_Equals_and_Hash_Code.txt ├── 120 ├── src_chapt12_sect001_Kotlin_And_Functional_Programming.txt ├── src_chapt12_sect002_Functions_Without_Names__Lambda_Functions.txt ├── src_chapt12_sect003_Loops_Once_Again.txt ├── src_chapt12_sect004_Functions_With_Receivers.txt ├── src_chapt12_sect005_Inline_Functions.txt └── src_chapt12_sect006_Filters.txt ├── 130 ├── src_chapt13_sect000_.txt ├── src_chapt13_sect001_Simple_Generics.txt ├── src_chapt13_sect002_Declaration_Side_Variance.txt ├── src_chapt13_sect003_Variance_For_Immutable_Collections.txt ├── src_chapt13_sect004_Type_Projections.txt ├── src_chapt13_sect005_Star_Projections.txt ├── src_chapt13_sect006_Generic_Functions.txt └── src_chapt13_sect007_Generic_Constraints.txt ├── 140 ├── src_chapt14_sect000_.txt ├── src_chapt14_sect001_Annotations_in_Kotlin.txt ├── src_chapt14_sect002_Annotation_Characteristics.txt ├── src_chapt14_sect003_Applying_Annotations.txt ├── src_chapt14_sect004_Annotations_With_Array_Parameter.txt ├── src_chapt14_sect005_Reading_Annotations.txt └── src_chapt14_sect007_Custom_Annotations.txt ├── 160 ├── src_chapt16_sect002_Classes.txt ├── src_chapt16_sect003_Generator_Functions.txt ├── src_chapt16_sect014_Joining.txt ├── src_chapt16_sect016_Zipping.txt └── src_chapt16_sect018_Sequences.txt ├── 170 ├── src_chapt17_sect001_The_Math_API.txt ├── src_chapt17_sect002_The_Date_Time_API__API_Level_25_or_Less.txt ├── src_chapt17_sect003_The_Date_Time_API__API_Level_26_or_Greater.txt ├── src_chapt17_sect004_Input_And_Output.txt ├── src_chapt17_sect005_Using_Reflection.txt └── src_chapt17_sect006_Regular_Expressions.txt ├── 180 ├── src_chapt18_sect001_Basic_Multithreading_The_Java_Way.txt ├── src_chapt18_sect002_Advanced_Multithreading_The_Java_Way.txt └── src_chapt18_sect003_Kotlin_Coroutines.txt ├── 190 ├── src_chapt19_sect001_Adding_External_Libraries.txt ├── src_chapt19_sect004_External_Libraries_And_Nullability.txt └── src_chapt19_sect005_Creating_Your_Own_Library.txt ├── 200 ├── src_chapt20_sect001_XML_Processing.txt └── src_chapt20_sect002_JSON_Processing.txt ├── 900 └── src_chapt90_sect001_Solutions_to_The_Exercises.txt ├── .gitattributes ├── 000 └── src_chapt00_sect000_.txt ├── 010 ├── src_chapt01_sect005_Continuing_with_The_HelloKotlin_App.txt └── src_chapt01_sect006_Using_The_Command_Line.txt ├── 020 ├── src_chapt02_sect001_Kotlin_And_Object_Oriented_Programming.txt ├── src_chapt02_sect002_A_Simple_Number_Guessing_Game.txt ├── src_chapt02_sect003_Constructors.txt ├── src_chapt02_sect004_If_Classes_Are_Not_Needed__Singleton_Objects.txt ├── src_chapt02_sect005_If_State_Doesn_t_Matter__Companion_Objects.txt ├── src_chapt02_sect006_Describing_a_Contract__Interfaces.txt └── src_chapt02_sect007_Structuring_And_Packages.txt ├── 030 ├── src_chapt03_sect001_Properties_And_Their_Types.txt ├── src_chapt03_sect002_Member_Functions.txt ├── src_chapt03_sect003_Inheritance.txt ├── src_chapt03_sect004_Local_Variables.txt ├── src_chapt03_sect005_Visibility_of_Classes_And_Class_Members.txt ├── src_chapt03_sect006_Self_Reference__This.txt └── src_chapt03_sect007_Converting_Classes_to_Strings.txt ├── 040 ├── src_chapt04_sect001_Anonymous_Classes.txt ├── src_chapt04_sect002_Inner_Classes.txt ├── src_chapt04_sect004_Importing_Functions_And_Properties.txt ├── src_chapt04_sect005_Data_Classes.txt ├── src_chapt04_sect006_Enumerations.txt ├── src_chapt04_sect007_Custom_Property_Accessors.txt ├── src_chapt04_sect008_Kotlin_Extensions.txt ├── src_chapt04_sect009_Functions_With_Tail_Recursion.txt ├── src_chapt04_sect010_Infix_Operators.txt ├── src_chapt04_sect011_Operator_Overloading.txt └── src_chapt04_sect012_Delegation.txt ├── 050 ├── src_chapt05_sect001_Expressions_Examples.txt ├── src_chapt05_sect002_Expressions_Ubiquity.txt ├── src_chapt05_sect003_Numerical_Expressions.txt ├── src_chapt05_sect004_Boolean_Expressions.txt ├── src_chapt05_sect007_Other_Operators.txt └── src_chapt05_sect008_Conversions.txt ├── 060 ├── src_chapt06_sect003_Class_Comments.txt └── src_chapt06_sect004_Function_And_Property_Comments.txt ├── 070 ├── src_chapt07_sect001_Ifs_And_Whens.txt ├── src_chapt07_sect002_Ranges.txt ├── src_chapt07_sect003_For_And_While_Loops.txt ├── src_chapt07_sect004_Scoping_Functions.txt └── src_chapt07_sect005_Conditional_Execution.txt ├── 080 ├── src_chapt08_sect001_Kotlin_And_Exceptions.txt ├── src_chapt08_sect002_More_Exceptions_Types.txt ├── src_chapt08_sect003_Throwing_Exceptions_Yourself.txt └── src_chapt08_sect004_Exceptions_in_Expressions.txt ├── 090 ├── src_chapt09_sect001_Defining_And_Using_Arrays.txt ├── src_chapt09_sect002_Array_Instantiation.txt ├── src_chapt09_sect004_Sets__Lists_And_Maps.txt ├── src_chapt09_sect005_Pairs_and_Triples.txt ├── src_chapt09_sect006_Loops_Over_Data_Containers.txt ├── src_chapt09_sect008_Grouping__Folding__Reducing_And_Zipping.txt ├── src_chapt09_sect010_The_Spread_Operator.txt └── src_chapt09_sect012_A_Statistics_Class_For_The_NumberGuess_App.txt ├── 9781484244661.jpg ├── Contributing.md ├── LICENSE.txt ├── README.md └── errata.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /000/src_chapt00_sect000_.txt: -------------------------------------------------------------------------------- 1 | //// ------------------------------------------------------ 2 | //// Snippets from chapter 00: 3 | //// Frontmatter 4 | //// Section: 0. 5 | //// ------------------------------------------------------ 6 | 7 | 8 | //----#### SNIPPET #### - 1 9 | arrayOf("Blue", "Green", "Yellow", "Gray"). 10 | filter { it.startsWith("G") }. 11 | forEach { item -> 12 | println(item) 13 | } 14 | 15 | //----#### SNIPPET #### - 2 16 | https://github.com/Apress/learn-kotlin-for-android-development 17 | -------------------------------------------------------------------------------- /010/src_chapt01_sect005_Continuing_with_The_HelloKotlin_App.txt: -------------------------------------------------------------------------------- 1 | //// ------------------------------------------------------ 2 | //// Snippets from chapter 01: 3 | //// Your First Kotlin Application: Hello Kotlin 4 | //// Section: 5. Continuing with The HelloKotlin App 5 | //// ------------------------------------------------------ 6 | 7 | 8 | //----#### SNIPPET #### - 1 9 | 10 | 20 | 21 | 29 |