java algrithm demo init