Java Example 2 Artificial Intelligence