![]() ![]() ![]() In the internal implementation of toString, you can imagine that there is a bit of logic that says "if the instance is null, return "null"". ![]() Public expect fun String.lowercase(): String We can see this from their signatures: public fun Any?.toString(): String Is it the method, such as toString() or lowerCase(), that is handling the "nullness" passed to it by an operator and not the String class itself?Īmong toString and lowerCase, only toString handles nulls. String? is the nullable version of String. If I understand your question correctly, that is correct, String is itself not nullable. Is the "nullness" of the String not stored in the String Class itself? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |