*Get the Official Certificate after Completing the Course
Even though Kotlin is a full–fledged functional programming language, it preserves most of the object–oriented nature of Java as an alternative programming style, which is very handy when converting existing Java code. Kotlin has classes with constructors, along with nested, inner, and anonymous inner classes, and it has interfaces like Java 8. Kotlin does not have a new keyword. To create a class instance, call the constructor just like a regular function. We saw that in the screenshot above.
Kotlin has single inheritance from a named superclass, and all Kotlin classes have a default superclass Any, which is not the same as the Java base class java.lang.Object. Any contains only three predefined member functions: equals(), hashCode(), and toString().
Kotlin classes have to be marked with the open keyword in order to allow other classes to inherit from them; Java classes are kind of the opposite, as they are inheritable unless marked with the final keyword. To override a superclass method, the method itself must be marked open, and the subclass method must be marked override. This is all of a piece with Kotlin’s philosophy of making things explicit rather than relying on defaults. In this particular case, I can see where Kotlin’s way of explicitly marking base class members as open for inheritance and derived class members as overrides avoids several kinds of common Java errors.
Specification: Kotlin Android Training – Mastering Android App Development
|
User Reviews
Be the first to review “Kotlin Android Training – Mastering Android App Development” Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Price | $14.99 |
---|---|
Provider | |
Duration | 31 hours |
Year | 2022 |
Level | All |
Language | English ... |
Certificate | Yes |
Quizzes | No |
$84.99 $14.99
There are no reviews yet.