Awesome work as usual....Just began to learn how to code. How come sometimes you give the variable, default values like zero for age but you dont do it here. (For instance the example on constructors)
Data class seems to be nice feature however its adds a security flaw. for instance if we do a print on the log file the objects enitre atrributes with its value will be shown on the log. Say I am having a User Data object and if I print the log it will print user name and password on the log
you are perfect as allways. ! Could you please consider about inheritence in data classes.I know data classes cannot inherit.. but can you show us way to do that in kotlin for POJO ?
I know this comment is at least a year old, but answering anyway: The val in the constructor simply means that the values in a laptop cannot be changed once it's constructed. Copy creates an entirely new object, using the variables that were used to construct the original. The copy() with the price value simply reads the variables of lap1 when constructing the new object, but ignores lap1's price value, and instead uses the one given to the copy method.
Lots of love for your efforts from Pakistan :)
Awesome work as usual....Just began to learn how to code. How come sometimes you give the variable, default values like zero for age but you dont do it here. (For instance the example on constructors)
sir thanx alot .please upload videos as soon as possible .please sir .excellent way of explaining the concept.
Explained very well! Thank you for this Video x
really this is efficient . and Very good explanation
Data class seems to be nice feature however its adds a security flaw. for instance if we do a print on the log file the objects enitre atrributes with its value will be shown on the log. Say I am having a User Data object and if I print the log it will print user name and password on the log
mahn u r awesome...keep the work on...
Can you please show me the reference where i can achieve the same using toString(), equals(), hascode() and clone() methods
you are perfect as allways. ! Could you please consider about inheritence in data classes.I know data classes cannot inherit.. but can you show us way to do that in kotlin for POJO ?
Nice explanation. Thanks
i have one question, you are using val in primary constructor section but you change price value in .copy() function how it is possible?
I know this comment is at least a year old, but answering anyway:
The val in the constructor simply means that the values in a laptop cannot be changed once it's constructed.
Copy creates an entirely new object, using the variables that were used to construct the original. The copy() with the price value simply reads the variables of lap1 when constructing the new object, but ignores lap1's price value, and instead uses the one given to the copy method.
Can we use data and open keyword at same time
awesome work sir
Keep doing that..
Never seen a more confused man
Tks you!
aliens hahaha
Apple is clearly not happy with you teaching Kotlin, enable siri!