title: How to randomly assigned employees from the list to 4 different groups
body: <p>yeah sorry, for confusion! my business requirements are:
  An Employee object that holds a list of employees and each employee has groupNumber (1-4); and I want employees to gain experience in all other groups including they own. In each group I want to see at least 1 employee from different groups (ideal will be to have 4 employees in new generated groups from different groups). Code below is doing the random orders, what should I use to apply conditions above. Thank you for any suggestions. </p>
  
  <pre><code>public class EmployeeTest {
  
      public static void main(String[] args) {
          Random random = new Random();
          int group_num = random.nextInt(30);
          int max = 0;
  
          if(max &gt; 4) {
              group_num = 1;
              ArrayList&lt;Employee&gt; emps = new ArrayList();
  
              emps.add(new Employee("Tom", "Technology", 56, 34, 46, 23));
              emps.add(new Employee("Nick", "Technology", 65, 33, 21, 23));
              emps.add(new Employee("Jerry", "Technology", 56, 34, 46, 23));
              emps.add(new Employee("Janet", "Technology", 56, 34, 46, 23));
              emps.add(new Employee("Chitra", "Trading", 12, 54, 46, 23));
              emps.add(new Employee("Sally", "Trading", 16, 64, 46, 23));
  
              for(Employee e : emps) {
      //          Random random = new Random();
      //          int group_num = random.nextInt(30);
      //          int max =0;
      //          if(max &gt; 4) {
      //              group_num = 1;
  
              }
  
              System.out.println("Employee | identifier: " + e.getUnicIdentifier() 
                  + ", department: " + e.getDepartment()
                  + ", texh_exp: " +  e.getTech_exp() 
                  + " , trade_exp: " + e.getTrade_exp()
                  + " , op_exp: " + e.getOp_exp()
                  + ", shared_exp: " + e.getShared_exp()
                  + ", group_num: " + group_num);
          }
      }
  }
  </code></pre>