• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

I'm a moron - Java help please

erub

Diamond Member
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);
 
10001011010100010110111010101101110111101000101110111101010101010010101101010101100101

I r teh 1337

😛

But yeah, those other guys have it too.
 
Back
Top