I am trying to convert an object from an object to an integer in java. These are the results I get with the following methods:
Object intObject = 50;
intObject: 50
intObject.toString(): 50
Integer.getInteger(intObject.toString()): null
I have no idea why I would get a null when converting the string of the object to an integer.
Here is the code that I am using:
final Object temp = mCloudEntity.get(SaveAndLoadManager.TAG_TEST_INT);
Log.i(TAG, "intObject: " + temp );
Log.i(TAG, "intObject.toString(): " + temp.toString());
Log.i(TAG, "Integer.getInteger(intObject.toString()): " + Integer.getInteger(temp.toString()));