AndroidBites | very late to init?

lateinit vs nullable type, is lateinit actually the answer to your nullable type issues.

Hi #androidDevs, This is Androidbites where I try to break down a small concept into an understandable code snippet and share my learning experience with it.

Today’s topic is related to handling nullability using lateinit modifier, I absolutely agree `null` is the Billion dollar problem in a programming language, and for you, as a developer, it’s your responsibility that your app doesn't fall in as a victim of it and not crash your app due to that, In kotlin there are many languages functionalists build in that enable you to aware of null happening code and ask you to cater them properly.

Lateinit is one of those tools, the solution of a problem is not to create that problem right? Similarly instead of having a nullable type just replace it with non-null type? right 🧐? an obvious solution,

let’s dig deeper with the snippet below, 👁 on the code 💻.

Coding enthusiast! love Android #kotlinAlltheWay, want to explore all opportunity around it! CodingMantra: #cleanCoder #TDD #SOLID #designpatterns