By default java does not have the option to create a password protected zip, but have a look at this thread in stackoverflow to get some option for creating the password protected file you need:
https://stackoverflow.com/questions/10587561/password-protected-zip-file-in-java
I remember doing this with Zip4J as in the code snippet found in Erwin's link. But something to be aware of; iirc you can choose between having proper encryption that is not going to be compatible with every zip application or having weak encryption that is.