web123456

Two ways to convert object class object into int object in java

1. First convert the object object into a String, and use parseInt in Inetger to int

Objcet obj;

int a= (());

 

2. First force object to long, then convert it to int

Object obj ;
Long long = (Long) obj;
int a= ();