Q:

Java-Using a variable created in an if statement

I need to use a variable I created inside an if statement.  My code however, doesn't compile.  I just need assistance in compiling it while keeping the functionality the same. 
Here is a fragment of the code
else if (in.equals("Monster") && in1.equals("Orc"))
  { Players Character = new Orc();
    System.out.println("You have chosen "+in+" type "+in1+".  Monsters in general are more attack orientated");
  }
  Character.addAttack(5);

A:

In order to make it work outside your if condition you just need to declare the Character outside your if condition. 
/* Declare it here */
Players Character = null;

if(...) {
/* Do Something Here */
} else if (in.equals("Monster") && in1.equals("Orc")) { 
    Character = new Orc();
    System.out.println("You have chosen " + in + " type " + 
                       in1 + ".  Monsters in general are more attack orientated");
}

/* Now you can use it here */
Character.addAttack(5);

