Convert Object to Integer in java

I found this very tricky. I  first converted Object to String then used java’s Integer.parseInt(String s) method to change String to Integer. Then I added int value to the converted value, wihch verifies the object has been successfully converted to int.  public class ObjectToInt { public static void main(String args[]) { Object object = … Continue reading “Convert Object to Integer in java”