Android : How is this user defined data type type-casted?

on Wednesday, March 25, 2015



Button buttonClick = (Button) findViewById(R.id.button)


Applying Java grammar, the above statement means the value returned by method findViewById() is changed to the data type Button, and stored in variable buttonClick.


I've studied Java(apparently not enough!), and have never come across type casting a user-defined data type. How does this work?


0 comments:

Post a Comment