3 months may be enough time. The key to succeeding is to actually learn to program
java. Some people just think they can "memorize" a bunch of rules and regurgitate them when they take the
test. This is almost always a sure recipie for failure.
But if you take the time to write a little bit of code each day, and "play" with the concepts you are learning in your studies, you will actually "learn" how to do it, rather than "memorizing." If you keep a regular study schedule for 3 months, there's no reason why you can't pass with a very good score as well!