int aid = -this.id; 不能直接转 必须先赋值给一个变量 int c = this.id; int a = c * (-1); this.id = a; 转载于:https://www.cnblogs.com/superMay/p/5749620.html