There is no such thing as compiling a string literal for bytecode. However, there is a byte representation of String, however, as you have noticed, most text viewers will translate this representation of the byte into its normal ascii / unicode representation. In any case, saving even the obfuscation of the username / password is a security risk and should never be performed.
In order to safely store the username / password, you must access it from an external protected file, and not hardcode it into the program.
source share