导入org.apache.commons.math3.distribution.ChiSquaredDistribution是可以的,因为ChiSquaredDistribution是org.apache.commons.math3.distribution包中的一个类,可以直接导入。
而导入org.apache.commons.math3是不行的,因为org.apache.commons.math3是一个包,不是一个具体的类。在Java中,只能导入具体的类,而不能导入包。如果想要使用org.apache.commons.math3包中的类,需要逐个导入具体的类,例如导入org.apache.commons.math3.distribution.ChiSquaredDistribution。
没有搜到相关的沙龙