How to cast an Object to an int

后端 未结 19 2071
长情又很酷
长情又很酷 2020-11-27 09:58

How can I cast an Object to an int in java?

19条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 10:29

    Finally, the best implementation for your specification was found.

    public int tellMyNumber(Object any) {
        return 42;
    }
    

提交回复
热议问题