where does the password reside?
In the user's head, or some other place the user elects to store it.
Should it be stored somewhere in the Java code
Not if you want useful security. Anyone can reverse-engineer the app to get the hard-coded passphrase.
can the (4 digit) passcode of a user be used to encrypt and decrypt the DB?
I have no idea what you are referring to. You are certainly welcome to prompt the user for a passphrase. Please do not limit it to a 4 digit value, though, as that can be brute-forced very easily.
is it possible to give several users with different passcodes access to the same database (i.e. decrypt it)?
Not really. SQLCipher only supports one passphrase per database. You can have different databases per user, each encrypted with the user's own hopefully-decent passphrase.