标签:而不是 代码 ret double test ble class 权限 color
package com.xmj.test; public class Firework { private double weight = 0; private double compare(Firework f){ return weight - f.weight; } }
代码编译通过,说明是访问的权限是在类的级别,而不是对象级别,在类中时能够调用的。
标签:而不是 代码 ret double test ble class 权限 color
原文地址:https://www.cnblogs.com/xiemingjun/p/9978496.html