java.lang.Math.srt()怎么用举一个例子,谢谢了,急用

解决方案 »

  1.   

    public class Test
    {
    public static void main(String[] args) { 
    java.lang.Math math = null;
    System.out.println(math.sqrt(25.0));
    }
    }
      

  2.   

    double a=Math.sqrt(25.0);
    返回正确舍入的double值的正平方根。
    注意:参数要是double类型,返回值也是double
      

  3.   

    import java.lang.Math: 
    public class TestMath
    {
        public static void main(String[] args) { 
            double a = Math.sqrt(25);
            System.out.println(a);
        }
    }