title: using array strings in an if statement
body: <p>I am trying to work out how to add a value to a variable based on if a String is present in an array. Hopefully my code will explain it better:</p>
  
  <pre><code>//calculate bonus
  String[] department = {"Dublin","London","London","Dublin","Paris","Paris"};
  int [] brokerTotal =(79,35,55,101,63,108};
  
  int[] bonus;
  bonus=new int[6];
  
  for(int i = 0;i &lt; department.length; i++) {
      if (department ="Dublin") bonusRate=12;
      else if (department="London") bonusRate=15;
      else bonusRate=10;
      bonus[i] = ((brokerTotal[i])/100)*bonusRate;
  }
  </code></pre>
  
  <p>The if statements are catching me here, am I close or totally off the mark here?</p>