Загрузка страницы

Companion object in kotlin | Replacement of java static keyword in kotlin. #kotlin 9 program.

Companion object in kotlin | Replacement of java static keyword in kotlin. #kotlin 9 program.

Companion object:- in kotlin if you want to write a function or any member of the class that can be called without having the instance of the class then you can write the same as a companion object inside the class.
to create companion object you need to add the companion keyword in front of the object declaration like below.

class Sample{
companion object {
///member or function that can access directly with class name
}
}

My channel link subscribe to my channel
https://www.youtube.com/channel/UCCjZhrC5VJj-ost-9mPokDg

that's it from today hope you understand this video

please suggest if you want a video in any topic in comment below

Thanks

Видео Companion object in kotlin | Replacement of java static keyword in kotlin. #kotlin 9 program. канала Android share
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
29 июля 2022 г. 23:30:25
00:11:54
Другие видео канала
Scope function in kotlin. with block, compare with vs run operator. #kotlin 22 program.Scope function in kotlin. with block, compare with vs run operator. #kotlin 22 program.How to create functions in kotlin|function types in kotlin. Baisc kotlin program. #kotlin 4 program.How to create functions in kotlin|function types in kotlin. Baisc kotlin program. #kotlin 4 program.Android Permissions at runtime for above 5.0,permission problems in Marshmallow|Android shareAndroid Permissions at runtime for above 5.0,permission problems in Marshmallow|Android shareAndroid listview|List view with image view and text view in android|Android shareAndroid listview|List view with image view and text view in android|Android shareSealed class in kotlin. Usage of sealed class with when expression kotlin. #kotlin 15 program.Sealed class in kotlin. Usage of sealed class with when expression kotlin. #kotlin 15 program.Scope function in kotlin. Also block, compare Also vs let operator. #kotlin 24 program.Scope function in kotlin. Also block, compare Also vs let operator. #kotlin 24 program.Lateinit and lazy initialization in kotlin. Difference between lateinit & lazy. #kotlin 6 program.Lateinit and lazy initialization in kotlin. Difference between lateinit & lazy. #kotlin 6 program.kotlin collections. Mutable types of collections (List, Set, Map) in kotlin. #kotlin 18 program.kotlin collections. Mutable types of collections (List, Set, Map) in kotlin. #kotlin 18 program.Image slider using viewpager in android,image view design slider in android|Android shareImage slider using viewpager in android,image view design slider in android|Android shareLiveData in kotlin.LiveData with primitive and custom types in kotlin. #kotlin 19 program.LiveData in kotlin.LiveData with primitive and custom types in kotlin. #kotlin 19 program.Button listeners in android|Steps to create and run android program|Android shareButton listeners in android|Steps to create and run android program|Android share#2 SQLite database in android, simple operations in SQLite database in android|Android share#2 SQLite database in android, simple operations in SQLite database in android|Android shareAlertDialog Example in android, Inbuilt dialog, how to create alert dialog in androidAlertDialog Example in android, Inbuilt dialog, how to create alert dialog in androidMove or jump from one activity to other in android|Changing default(launcher) activity|Android shareMove or jump from one activity to other in android|Changing default(launcher) activity|Android shareHow to make two app launchers of one app,remove duplicate apps creation|Android shareHow to make two app launchers of one app,remove duplicate apps creation|Android shareInheritance in kotlin.| How kotlin inheritance different from java inheritance. #kotlin 13 program.Inheritance in kotlin.| How kotlin inheritance different from java inheritance. #kotlin 13 program.kotlin collections. Immutable types of collections in kotlin. #kotlin 17 program.kotlin collections. Immutable types of collections in kotlin. #kotlin 17 program.Scope function in kotlin. Apply block, compare Apply vs run operator. #kotlin 23 program.Scope function in kotlin. Apply block, compare Apply vs run operator. #kotlin 23 program.How to create if else & when in kotlin|kotlin as expresion. Baisc kotlin program. #kotlin 5 program.How to create if else & when in kotlin|kotlin as expresion. Baisc kotlin program. #kotlin 5 program.Baisc kotlin program| Null safety in kotlin Safe calls, Elvis operator, !! ope .#kotlin 3 program.Baisc kotlin program| Null safety in kotlin Safe calls, Elvis operator, !! ope .#kotlin 3 program.
Яндекс.Метрика