Java Scripting learning and testing the code