static void cleanGarbage(){
  System.gc();
  try {
    Thread.sleep(100);
  }
 catch (  Exception e) {
  }
  System.gc();
}

static void cleanGarbage ( ) { System . gc ( ) ; try { Thread . sleep ( 100 ) ; } catch ( Exception e ) { } System . gc ( ) ; }
used for testing whether references are cleared .
