Java Declare Variable Outside Loop