Let's start with the basics:
- We created a MovieSelector class with the sMovieTitle class variable, the constructor, and a getTheMovieTitle() method.
- The constructor of the class will be used when you create an instance of the class (with the keyword new, in this case, MovieSelector ms = new MovieSelector('Lethal Weapon';).
- During the creation of the class, the constructor executes every single line of code in this constructor only once. In this case, we assign the title Lethal Weapon, defined in the string parameter in the constructor, to the sMovieTitle class variable. And that's all. It's just as if we created a new movie record, in memory, with the title Lethal Weapon.
- The second line of code in the ...