Menu

Cast an object to Integer in Java

We could cast an object that have integer value into an integer using below Java code.

int value = Integer.parseInt(object.toString());

No comments:

Post a Comment