@Test public void test() { String[] args = {}; App.main(args); }
public static void main(String[] args) { HolderNaive holderNaive = new HolderNaive(); Heavy heavy = holderNaive.getHeavy(); LOGGER.info("heavy={}", heavy); HolderThreadSafe holderThreadSafe = new HolderThreadSafe(); Heavy another = holderThreadSafe.getHeavy(); LOGGER.info("another={}", another); Java8Holder java8Holder = new Java8Holder(); Heavy next = java8Holder.getHeavy(); LOGGER.info("next={}", next); }
App { public static void main(String[] args) { HolderNaive holderNaive = new HolderNaive(); Heavy heavy = holderNaive.getHeavy(); LOGGER.info("heavy={}", heavy); HolderThreadSafe holderThreadSafe = new HolderThreadSafe(); Heavy another = holderThreadSafe.getHeavy(); LOGGER.info("another={}", another); Java8Holder java8Holder = new Java8Holder(); Heavy next = java8Holder.getHeavy(); LOGGER.info("next={}", next); } }
App { public static void main(String[] args) { HolderNaive holderNaive = new HolderNaive(); Heavy heavy = holderNaive.getHeavy(); LOGGER.info("heavy={}", heavy); HolderThreadSafe holderThreadSafe = new HolderThreadSafe(); Heavy another = holderThreadSafe.getHeavy(); LOGGER.info("another={}", another); Java8Holder java8Holder = new Java8Holder(); Heavy next = java8Holder.getHeavy(); LOGGER.info("next={}", next); }  }
App { public static void main(String[] args) { HolderNaive holderNaive = new HolderNaive(); Heavy heavy = holderNaive.getHeavy(); LOGGER.info("heavy={}", heavy); HolderThreadSafe holderThreadSafe = new HolderThreadSafe(); Heavy another = holderThreadSafe.getHeavy(); LOGGER.info("another={}", another); Java8Holder java8Holder = new Java8Holder(); Heavy next = java8Holder.getHeavy(); LOGGER.info("next={}", next); }  static void main(String[] args); }
App { public static void main(String[] args) { HolderNaive holderNaive = new HolderNaive(); Heavy heavy = holderNaive.getHeavy(); LOGGER.info("heavy={}", heavy); HolderThreadSafe holderThreadSafe = new HolderThreadSafe(); Heavy another = holderThreadSafe.getHeavy(); LOGGER.info("another={}", another); Java8Holder java8Holder = new Java8Holder(); Heavy next = java8Holder.getHeavy(); LOGGER.info("next={}", next); }  static void main(String[] args);  }