Implementation of Heuristic search algorithms in java