sample java code run through netbeans