Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to convert object type to int type in java
How to convert object type to int type in java

This should be based on the specific type.

Object should not be converted directly unless you define your own method to judge and convert it into a normal String

For int, you can use Ineger.parseInt(String a); and other specific types have corresponding methods.