方法如下: double myDouble=1.2; int myInt=(int)(myDouble+0.5); console.log(myInt); 转载于:https://www.cnblogs.com/junyong/p/3594334.html