A java program working with graphs simulating a small internet