'Javap -l does not show me my local variable table
For some reason, Command prompt isn't providing me with a local variable table, even though I am using the -l option. Any suggestion/points?

Edit, here is the code for SumSqrt class:
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));
}
}
Solution 1:[1]
Use the command
javac -g SumSqrt.java
After that use
javap -l SumSqrt.class
To store this output to file
javap -l SumSqrt.class > SumSqrt.txt
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jayaramachandran David |
