Sign in Go Pro

The Kotlin Programming Language

Kotlin Class Primary Constructor

 
Autoplay

Up next

Previous

About

In this lesson, you'll learn how to create a primary constructor in a Kotlin class and why you would use it.

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>

Lessons in The Kotlin Programming Language

1. Installing the IntelliJ IDE for Kotlin Development
01:13
Donn Felker
2. Creating a Kotlin File in IntelliJ
01:18
Donn Felker
3. How to Update the Kotlin Plugin in IntelliJ
01:05
Donn Felker
4. Kotlin Hello World
01:06
Donn Felker
5. Creating Variables in Kotlin
03:17
Donn Felker
6. Creating Read Only Variables in Kotlin
02:13
Donn Felker
7. Providing the Type on Kotlin Variables
01:40
Donn Felker
8. Kotlin Data Types: Numbers
07:15
Donn Felker
9. Kotlin Data Types: String and Char
02:57
Donn Felker
10. Kotlin String Interpolation and Triple Quotes
05:15
Donn Felker
11. Kotlin Data Types: Boolean
01:52
Donn Felker
12. Kotlin Conditionals: If/Else
05:06
Donn Felker
13. Kotlin Conditionals: Single line if/else
03:52
Donn Felker
14. Kotlin Conditionals: Truth Tables
05:51
Donn Felker
15. Kotlin Structural Equality
02:11
Donn Felker
16. Kotlin Referential Equality
02:27
Donn Felker
17. Kotlin Nullable Types
01:26
Donn Felker
18. Kotlin Nullable Safe Calls
03:35
Donn Felker
19. Kotlin Elvis Operator
02:01
Donn Felker
20. How to Create a Function in Kotlin
05:41
Donn Felker
21. Returning a value from a Kotlin Function
05:20
Donn Felker
22. Kotlin Functions inside of other Functions
03:02
Donn Felker
23. Kotlin Single Line Expressions
04:08
Donn Felker
24. Kotlin Function Arguments
05:50
Donn Felker
25. Kotlin Named Parameters in Functions
04:25
Donn Felker
26. Kotlin Default Arguments
04:30
Donn Felker
27. Kotlin Refactoring to New Lines and Named Arguments in IntelliJ
01:30
Donn Felker
28. Kotlin Varargs: Providing Multiple Arguments of the Same Type
02:44
Donn Felker
29. Kotlin Function Overloading
03:33
Donn Felker
30. How to Create a Class in Kotlin
07:01
Donn Felker
31. Kotlin Class Primary Constructor
03:47
Donn Felker
32. Kotlin Class with Multiple Constructors
08:01
Donn Felker
33. Kotlin Init Block
03:39
Donn Felker
34. Kotlin Class Properties
03:03
Donn Felker
35. Kotlin Read-Only Class Properties
00:53
Donn Felker
36. Kotlin Overriding the Property Getter
01:42
Donn Felker
37. Kotlin Overriding the Property Setter
03:06
Donn Felker
38. Kotlin Multiple Properties in a Class
01:30
Donn Felker
39. Kotlin Class Functions
04:39
Donn Felker
40. Kotlin Companion Objects
05:41
Donn Felker
41. How to Create a Singleton in Kotlin
07:37
Donn Felker
42. Declaring Constants in Kotlin
06:59
Donn Felker
43. Kotlin lateinit Modifier
04:14
Donn Felker
44. Kotlin Nested Classes
03:35
Donn Felker
45. Kotlin Inner Classes
02:59
Donn Felker
46. How to Create an Enum in Kotlin
04:40
Donn Felker
47. Kotlin Enum Constructor Parameters
03:51
Donn Felker
48. Creating Abstract Functions inside of Kotlin Enums
03:24
Donn Felker
49. Iterating Over Enum Values in Kotlin
01:13
Donn Felker
50. Adding Static Methods to Kotlin Enums
01:33
Donn Felker
51. Kotlin Conditionals - The Kotlin when statement
06:41
Donn Felker
52. Kotlin when Statement - Exhaustive vs Non-exhaustive
06:51
Donn Felker
53. Kotlin Data Classes
04:18
Donn Felker
54. Kotlin Data Classes - Parameterless Constructors
01:13
Donn Felker
55. Kotlin Data Class Component1, Component2, ComponentN
03:35
Donn Felker
56. Kotlin Data Class Destructuring
03:32
Donn Felker
57. Copying Kotlin Data Classes
03:30
Donn Felker
58. Kotlin Pair and Triple Data Classes
02:33
Donn Felker
59. Kotlin Protected Modifier for Variables
07:03
Donn Felker
60. Kotlin Protected Modifier for Methods
06:10
Donn Felker
61. Kotlin Internal Modifier
08:05
Donn Felker
62. How to Create an Abstract Class in Kotlin
04:38
Donn Felker
63. How to Implement an Abstract Class in Kotlin
13:45
Donn Felker
64. Kotlin Abstract Classes - Using Abstract Classes as an Abstraction
04:22
Donn Felker
65. What are Kotlin Interfaces Used For?
08:36
Donn Felker
66. Kotlin Interfaces - Creating an Interface in Kotlin
01:04
Donn Felker
67. Kotlin Interfaces - Implementing an Interface in Kotlin
01:19
Donn Felker
68. Kotlin Interfaces Example - Multiple File Systems
06:49
Donn Felker
69. Kotlin Anonymous Interfaces
04:55
Donn Felker
70. Creating Arrays in Kotlin
07:24
Donn Felker
71. Creating a List in Kotlin
05:40
Donn Felker
72. Creating Mutable Lists in Kotlin
08:01
Donn Felker
73. Filtering a List in Kotlin
05:42
Donn Felker
74. Finding Items in a Kotlin List
06:16
Donn Felker
75. Kotlin FilterNot on a List
01:26
Donn Felker
76. Creating a New Kotlin List from an Existing Kotlin List
02:30
Donn Felker
77. How to Flatten a List or an Array in Kotlin
02:59
Donn Felker
78. Combining Multiple Immutable Lists in Kotlin
01:42
Donn Felker
79. Kotlin List map Operator
08:18
Donn Felker
80. Kotlin map vs. flatMap
04:35
Donn Felker
81. Kotlin Set - A List with No Duplicates
04:50
Donn Felker
82. Kotlin For Loop
05:08
Donn Felker
83. Kotlin While Loop
03:46
Donn Felker
84. Kotlin forEach Collection Iteration
03:05
Donn Felker
85. Combine List into a Unique List with the union operator
02:50
Donn Felker
86. Kotlin Iterating over a List with an Index with forEachIndex
01:35
Donn Felker
87. Kotlin Ranges
01:31
Donn Felker
88. How To Create a Map in Kotlin
03:50
Donn Felker
89. How to create a Mutable Map in Kotlin
07:40
Donn Felker
90. Filtering and Transforming Maps in Kotlin
08:01
Donn Felker
91. Kotlin mapNotNull - Removing null items from a map
03:52
Donn Felker
92. Generate Large Sequences and Lists in Kotlin with generateSequence
02:49
Donn Felker
93. Kotlin Performance - Measuring performance with measureNanoTime
08:27
Donn Felker
94. Kotlin Sequences - Improving performance with Kotlin Sequences
12:45
Donn Felker
95. Kotlin - List vs. Set vs. Map
05:07
Donn Felker
96. The Kotlin Ternary Operator
01:25
Donn Felker
97. Kotlin Double Bang Operator !!
04:08
Donn Felker
98. Kotlin requireNotNull - Forcing something that is nullable to be not null
04:06
Donn Felker
99. Kotlin checkNotNull - Checking that a value is not null
02:01
Donn Felker
100. Filter a list for Not Null Values in Kotlin with filterNotNull
01:15
Donn Felker
101. Kotlin Type Hierarchy and Kotlin Type Checking with 'is'
06:32
Donn Felker
102. Casting in Kotlin
02:44
Donn Felker
103. Kotlin Safe Casting
03:22
Donn Felker
104. Understanding Generics with Lists and Maps in Kotlin
04:52
Donn Felker
105. Kotlin Generic Class - How to Create a Generic Class
07:16
Donn Felker
106. Throwing an Exception in Kotlin
02:48
Donn Felker
107. Kotlin - Creating a Custom Exception
02:50
Donn Felker
108. Kotlin Try Catch Statement
03:25
Donn Felker
109. Catching Multiple Exception Types in Kotlin
04:34
Donn Felker
110. Try/Catch/Finally in Kotlin
04:09
Donn Felker
111. Kotlin Try/Catch vs Try/Finally
02:35
Donn Felker
112. Kotlin typealias - How to create a typealias in Kotlin
03:11
Donn Felker
113. Creating a Kotlin Extension Function
08:36
Donn Felker
114. Kotlin Lazy Evaluation
03:12
Donn Felker
115. Kotlin Lazy Initializer Block
03:15
Donn Felker
116. Kotlin Packages and Imports
08:22
Donn Felker
117. Kotlin Type Inference
07:05
Donn Felker
118. Kotlin Lambdas - Understanding Simple Lambda Expressions
13:20
Donn Felker
119. Kotlin Lambdas - Lambdas as Function Parameters
05:54
Donn Felker
120. Kotlin Lambdas - Passing Values to Lambda Expression Function Parameters
11:14
Donn Felker
121. Kotlin Lambdas - Using Underscores to Signify Unused Parameters
02:47
Donn Felker
122. Kotlin Lambdas - The 'it' parameter
02:14
Donn Felker
123. Kotlin JVM Interop - Calling Kotlin from Java
03:01
Donn Felker
124. Kotlin JVM Interop - Calling Java from Kotlin
05:12
Donn Felker
125. Kotlin JVM Interop - Calling a Kotlin Extension Function from Java
03:00
Donn Felker
126. Kotlin JVM Interop - The JvmName Annotation
02:31
Donn Felker
127. Run Kotlin Code Anywhere with Kotlin Main Functions
00:54
Donn Felker
128. Working with the Kotlin REPL
02:37
Donn Felker
129. Kotlin Simple Calculator Project - Creating the Project and Main Function
02:03
Donn Felker
130. Kotlin Simple Calculator Project - Reading User Input with readLine()
04:21
Donn Felker
131. Kotlin Simple Calculator Project - Building the Calculator Logic
07:48
Donn Felker
132. Kotlin Simple Calculator Project - Adding Validation to your Simple Calculator
07:50
Donn Felker
133. Kotlin Simple Calculator Project - Compiling to a JAR File
02:27
Donn Felker
134. Kotlin Playground and Kotlin Koans
01:48
Donn Felker