String[] testObjects = new String[10];
for (int i = 0; i < testObjects.length; i++)
testObjects[i] = new String(Integer.toString(i));
for (int i = 0; i < testObjects.length; i++) {
EventListener listener = new MyEventListener(pw, i);
for (int j = 1; j <= i; j++) {
EventManager.addListener(testObjects[j], "helloWorldEvent", listener);
}
}