java read double code example
Example 1: input double java
import java.util.Scanner;
Scanner input = new Scanner(System.in);
double choice = input.nextDouble();
Example 2: read double java
import java.util.Scanner;
Scanner input = new Scanner(System.in);
double choice = input.nextDouble();
Example 3: reading string after double in java
myInt = scan.nextInt();
myDouble = scan.nextDouble();
scan.nextLine(); // Skip the remainder of the double line
myString = scan.nextLine();