Code example for Random

0
                                                      "Extreme COBOL Web 2.0 Developers Conference", 
                                                      "LinkedIn Anti-Networkers"}; 
 
  public static Group create(int groupID)
  { 
    String name = NAMES[new Random().nextInt(3)];
    return create(groupID, name);
  } 
 
  public static Group create(int groupID, String name)
  { 
    Group group = new Group();
    group.setApprovalModes(1);
    group.setBadge(Badge.FEATURED);
    group.setCategoriesEnabled(PostCategory.DISCUSSION);
    group.setCategoriesForModeratorsOnly(PostCategory.DISCUSSION);
    group.setCategory(1);
    group.setContactability(Contactability.CONTACTABLE);
    group.setContactEmail("bob@example.com");
    group.setCreatedTimestamp(System.currentTimeMillis());