title: Java programming, currency calculator
body: <p>As a beginner, i cannot really understand the issue in this code:</p>
  
  <pre><code>package Currency;
  
  import java.util.Scanner;
  
  public class Currency {
  
      public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
          double value1 = 0.00, value2 = 0.00;
          String currency;
  
          System.out.print("Enter a value: ");
          value1 = input.nextDouble();
          System.out.print("USD or EUR: ");
          currency = input.nextLine();
  
  
          if(currency.equals("USD")){
              value2 = value1 * 0.734878047;
              System.out.println(value1 + "USD = " + value2 + " EUR. (Conversion rate: 1 USD = 0.734878047 EUR)");
          } else if (currency.equals("EUR")) {
              value2 = value1 * 1.36077;
              System.out.println(value1 + "EUR = " + value2 + " USD. (Conversion rate: 1 EUR = 1.36077 USD)");
          } else {
              System.out.println("Conversion rate: 1 USD = 0.734878047 EUR"
              + "\nConversion rate: 1 EUR = 1.36077 USD");
          }
  
          input.close();
  
      }
  
  }
  </code></pre>
  
  <p>Somehow, it doesnt even read the second input, but just prints last else. Can anyone help me to get this right? :)</p>
  
  <p>Thank you in advance.</p>