Q:

Java String to Double

I recently began to program in Java, and i ran into a little problem:
I already made a String to Double line, but it doesn't seems to work proberly.  As you see, the string I want to convert into a Double is one of following: USD, GPB and EURO.  I know you can't convert text into a Double, but I already told Java the values of the Strings. 
When I run the program below, I get this error:

Exception in thread "main" java.lang. NumberFormatException: For input string: "usd" at sun.misc. FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang. Double.parseDouble(Unknown Source) at Valuta.main(Valuta.java:22)

Why does that happen? 
import java.util. Scanner;

public class Valuta {
    public static void main(String[] args){

        double euro, usd, gpb, done;

        Scanner input = new Scanner(System.in);

        euro = 7.46;
        usd = 5.56;
        gpb = 8.84;

        System.out.println("DKK to ??"); 
        System.out.println("USD,GPB or EURO?"); 
        String temp = input.nextLine();

        System.out.println("amount of dkk??"); 
        Double dkk = input.nextDouble();
        System.out.println("mhm");
        double donee = Double.parseDouble(temp);
        done = dkk*donee;
        System.out.println(done);

A:

I think what you want is to be able to associate user input for System.out.println("USD,GPB or EURO?");  to     
    euro = 7.46;
    usd = 5.56;
    gpb = 8.84;

One of hte ways to do it is to create a look up Map like this:
Map<String, Double> lookUpMap = new HashMap<String, Double>(){{
put("EURO", new Double(7.46));
put("USD", new Double(5.56));
put("GPB", new Double(8.84));
}};

Then parse user input and look up Double value:
lookUpMap.get(userInput)

