Using an object in an if statement... (Android)
- by James Rattray
I have an object variable Object test = Spinner.getSelectedItem();
-It gets the selected item from the Spinner (called spinner) and names the item 'test'
I want to do an if statement related to that object e.g:
'if (test = "hello") {
//do something
}'
But it appears not to work....
Can someone give me some help?
-Do I have to use a different if? or convert the object to string etc.?
Thanks alot...
James