Function generation in Eclipse by using Java #2