This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I am lost in understanding the following piece of code:
Let me explain the way I understand this:
1. btnOpen object is instantiated of datatype Button.
2. setOnClickListener method on the object btnOpen is invoked. To this method we need to pass an object (I guess no variable is mentioned, but lets assume 'x' is passed).
a. As this object does not exist yet, a constructor for the object is invoked:
Here, I guess the author has actually coded the constructor.
b. Within the constructor, a method is invoked (on which object???).