解决方案 »

  1.   

    The method sqrt(int) is undefined for the type Mathsqrt(double);
      

  2.   

    public static void main(String[] args) { /**
     * 返回正确舍入的 double 值的正平方根。
     * 特殊情况是: 如果参数是 NaN 或小于零,那么结果是 NaN。
     * 如果参数是正无穷大,那么结果就是正无穷大。
     * 如果参数是正零或负零,那么结果与参数相同。
     * 否则,结果是最接近该参数值的真实数学平方根的 double 值。
     */
    double dSqrtValue = Math.sqrt(124D); System.out.println(dSqrtValue); }
      

  3.   

    public static void main(String[] args) { /**
     * 返回正确舍入的 double 值的正平方根。
     * 特殊情况是: 如果参数是 NaN 或小于零,那么结果是 NaN。
     * 如果参数是正无穷大,那么结果就是正无穷大。
     * 如果参数是正零或负零,那么结果与参数相同。
     * 否则,结果是最接近该参数值的真实数学平方根的 double 值。
     */
    double dSqrtValue = Math.sqrt(124D); System.out.println(dSqrtValue); }