Classes & Objects in Kotlin | Object Oriented Programming | CheezyCode #14

preview_player
Показать описание
In this tutorial, learn about what is object oriented programming in Kotlin. Learn to create classes and objects in with examples. This tutorial is part #14 of Kotlin Programming For Beginners Series. Everything is explained in Hindi. Brief topics covered -

1. What is Object Oriented Programming?
2. How to Define classes?
3. What is a class and its objects?
4. Kotlin Class Syntax

Learn all this in Hindi (हिंदी में )

Kotlin Beginners Tutorial Series -

For more info - visit below link

We are social. Follow us at -
Рекомендации по теме
Комментарии
Автор

your tutorial is best, simple, fast and the best part is not wasting time on intro and tutorial

ashubhutani
Автор

आपके समझाने के तरीके के लिये ✳️✳️✳️✳️✳️ 5 star

KuldeepRaoMaratha
Автор

Very simple tutorial bro mai coding block me chhod k yaha aaya hu... free content is also best

pankajkumar-fntm
Автор

Thank you sir I'm coding beginner is kotlin good for starting sir

s.husain
Автор

Excellent lecture sir! Please cover getters setters, interface, data class, sealed class, etc. Thanks a ton!!

frankcarey
Автор

thanks sir for your struggle for us 🥰🥰🥰but plz come back

mahboobforever
Автор

thanks sir for making this videos thanks

IshantDixit.
Автор

Use ';' to separate expressions on same line..
Error in my compiler
I'm coding same as you

shahrozmukhtar
Автор

Sir can you please make a roadmap for android development?

yutaitadori
Автор

Please try creating videos explaining coroutines in detail

pks
Автор

The below example is proper example of class and object without using constructor ..

// Define the Car class
class CarExample {
// Properties (attributes) of the Car class
var make: String = ""
var model: String = ""
var year: Int = 0
var color: String = ""


// Method to start the car
fun start() {
println("$make $model is starting...")
}

// Method to stop the car
fun stop() {
println("$make $model is stopping...")
}
}

fun main() {
val myCar = CarExample()
myCar.make = "test"
println(myCar.make)
}





//i am very confused, which you write in code ..

why you directly pass properties in class??
class Car {
// Properties (attributes) of the Car class
var make: String = ""
var model: String = ""
var year: Int = 0
var color: String = ""

// Constructor to initialize the Car object
constructor(make: String, model: String, year: Int, color: String) {
this.make = make
this.model = model
this.year = year
this.color = color
}

can i write look like this ??

learningvideos
Автор

functions.kt:3:19: error: unresolved reference: name
val audi = Car( name:"Audi", type:"Petrol", kmRun:100)

Sir how to remove this error, this error persists after so many attempts.

shahjad.qureshi
Автор

मेरा बिचार से आपको vpn अप्प्स बनाना सिखाये |

mobileandroids