在Java中怎么把Int型的装换成Long型的

2025-02-23 14:12:28
推荐回答(2个)
回答1:

是会自动向上转型的. 不过你也可以这样写:Long id = new Long(10);

回答2:

int s=1;
long l=s;