I need to get the power value of a given number by user (as a command line argument)
This is my code and it has comes up with a compilation error.
Can anyone please help me ?
class SquareRoot{
public static void main(String args []){
double power = Math.pow(args[0]);
System.out.println("Your squared value is " + power);
}
}
This is because Math.pow needs two arguments. Something like:
See the javadoc.