There are three standard Java question types: write-a-method, write-a-class and write-a-program. The file PROTOTYPE_java_prog_bash_cmd.xml that I gave you in the previous posting implements a fourth question type: a variant of write-a-program that lets you specify the exact command line with which to run the program. But it's relatively untested and its only value would be when the question is explicitly focused on processing command line arguments.
In your case, where you just want students to write the isPrime(i) method, the write-a-method question type would seem to be what you want.
The quiz Some C and Java questions should give you some ideas on what you might do. The questions used there are included in the export file simpledemoquestions.xml on the GitHub repo.
In your case, where you just want students to write the isPrime(i) method, the write-a-method question type would seem to be what you want.
The quiz Some C and Java questions should give you some ideas on what you might do. The questions used there are included in the export file simpledemoquestions.xml on the GitHub repo.