+ 1
Can someone tell me the difference between two scenarios
Case 1: private TextView textview; public class a { .... textview = findViewById (R.id.textview); ..... } Case 2: public class a { TextView textview = findViewById (R.id.textview); } The textview is present within a ListView
1 Answer
+ 1
The first case you created a global reference to a textview, so you can use it in any part of the class. The second case I'd a local reference you can only use it locally.