Assuming that (scan) is a properly initialized scanner variable, which of the following correctly inputs a double?
A. double val = scan.nextLine();
B. double val = scan.nextDouble();
C. double val = nextDouble();
D. double val = scan.nextValue();
E. double val = scan.nextpouble;