title: How to get a value outside its brackets in java
body: <pre><code>System.out.println("Which horse do you want to win, enter in 1-5");
  
  String horsechoice = Input.next();
  
  int randomhorse = (int)(Math.random()*5+1);
  
  int horsechoice1 = Integer.parseInt(horsechoice);
  
  System.out.println(randomhorse);
  
  if (horsechoice1 == randomhorse){
      System.out.println("You win");
      int money = x + i;
      System.out.println("You have $"+money+ " remaining.");
  }else if(horsechoice1 != randomhorse){
      System.out.println("You Loose");
      int money = x - i;
      System.out.println("You have $"+money+ " remaining.");
  }
  </code></pre>
  
  <p>My goal is to get the int money outside of its brackets and to another part of my code further on. I feel like it should be a lot easier then I am making it. </p>