I'm working on a desktop app that talks with a database. I also want to implement user authentication. I can set all this up easily, but isn't it not secure just to have all that info in the source code? I know it's not a web app but still, just want to make sure I'm doing it right. For example, you could connect like this:
Connection conn = DriverManager.getConnection("host","user", "password");
Would this be bad to have in your source code?