i have a question " write an application that uses an enhanced for statment to sum the double values passed by the command-line argumants .[hint:Use the static method parseDouble of class double to convert a String to a double vale]"
this is what i wrote but its wrong can u please help me ASAP----->
public class args{
public static void parsedouble(){
for (int i=0;i
Double.parseDouble(args[i]);
}
}
public static void main(String args[]){
double total=0.0;
for(int i:args.length){
total+=parsedouble();
}
System.out.print(total);
}
}
2007-12-11
05:42:48
·
3 answers
·
asked by
funky !!
2
in
Computers & Internet
➔ Programming & Design