This should be so easy to do..but I am trying to convert a string to a double object, without using parseDouble (not allowed) - basically I want to read in a bunch of arguments from the command line (a string) - then average them all together (I was thinking of using an array to hold the different values - is there an easier way?): Here's how I was going to start, but I can't even get this to compile..the value line gives me an error every time, and I can't figure out how to fix it:
public static void main(String s)
{
double average;
double value;
Double a;
a = Double.valueOf(s);
value = Double.doubleValue(a);
public static void main(String s)
{
double average;
double value;
Double a;
a = Double.valueOf(s);
value = Double.doubleValue(a);