Javap -l没有显示我的本地变量表

时间:2017-11-03 17:59:31

标签: java command-prompt javap

由于某种原因,即使我使用-l选项,命令提示符也没有为我提供局部变量表。有什么建议/要点吗?

Image of what command prompt outputs for me.

编辑,这是SumSqrt类的代码:

public class SumSqrt {

/** Calculates the sum of the square roots of the elements of an array.
 * @param a the array
 * @return  Sum (i = 0 to a.length-1) Math.sqrt(a[i])
 */

public static double sumSqrt(double[] a) {
    double sum = 0.0;
    for(int i = 0; i<a.length; i++) {
        sum = sum + Math.sqrt(a[i]);
    }
    return sum;
}

public static void main(String[] args) {
    double[] array =  {2,10,30,44,9};

    System.out.println(sumSqrt(array));
}

}

0 个答案:

没有答案