Protected access modifier (protected)

Variables, methods, functions, and structures declared protected can be accessed only by classes in the same package as the defining class or by subclasses of their defining class that exist in a separate package:

public class Person(private var fullName: String) {
protected name: String
get() = fullName
set(value) {
fullName = value
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.39.133