I was reading a beginners tutorial on android development which had this line in it's code:
TextView fortune = (TextView) findViewById(R.id.fortune_text);
I'm fairly new to Java, but I understand the basics of creating variables. So making a new int variable:
int someInt = 4;
Looks a bit different from what is going on above. So I guess we are creating an instance of the TextView object, and then we are calling the findViewById method from the TextView class? But why the (TextView) bit? What are we telling java to do here?