web analytics

What code segment should you use?

You work as a Java programmer. You need to convert a numeric String to a primitive double value. What code segment should you use? A. Double.valueOf(numberString); B. double.parseDouble(numberString); C. String.parseDouble(numberString);

Review the underlined text. If it makes the statement correct, select “No change is needed.” If the statement is incorrect, select the answer choice that makes the statement correct.

The question requires that you evaluate the underlined text to determine if it is correct. You should use an int data type to store the numeric value 3,000,000,000 (3 billion)