JAVA编译错误 “No enclosing instance of type XXX is accessible”的解决方法
publicclassMain{publicclassFraction{publicintdividend;//被除数publicintdivisor;//除数Fraction(inta,intb){dividend=a/gcd(a,b);divisor=b/gcd(a,b);}doubletoDouble(){return(double)dividend/(double)divisor;}Fra