Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(final String[] args)
- {
- Client cl1 = new Client("cl1");
- cl1.initializeComponents();
- Client cl2 = new Client("cl2");
- cl2.initializeComponents();
- for (int i = 0; i < 10; i++){
- try {
- Date date = new Date();
- String formattedDate = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(date);
- cl1.sendMessage(formattedDate + " number of iteration " + i);
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- cl1.cleanUpConnection();
- cl2.cleanUpConnection();
- }
Advertisement
Add Comment
Please, Sign In to add comment