Break the problem down into pieces...you want to check several array values using logic, so to you cold just create a method that checks the array for you, returning the logic boolean your while loop...