In Java, we could create a global variable just by defining the variable at the beginning of class declaration and initializing it afterward. By just declaring it, we could use it as a global variable.
In this recipe, we will learn how to create and use a global variable in Kotin.