Java exam