Friday, May 24, 2013

How to Display a JavaScript-like Alert in Java

Just put the following in your Java code:

javax.swing.JOptionPane.showMessageDialog(null, "Your message here");

Note:
Similar to JavaScript, your code will pause executing until you close the message dialog. So be careful when deploying your code for the client.

Thursday, May 2, 2013

OCJP Exam Tips I didn't find online


Just want to share my experience when I took the SCJP Exam years ago. Yep, OCJP was called that way back when Sun Microsystems was not yet acquired by Oracle.

After months of reviewing, thanks to God He allowed me to pass the exam with a score of 91%.

The duration of the exam is not a problem.
From my experience, the time allotted to take the exam is more than what is needed. You can actually double the number of questions on the exam so it will fit more to the exam duration. Here's why: During the exam, I actually used the time answering the questions and checking all the items all over again as if it was my first time. That is to include the time it took me to go to the restroom and also taking a glass of water outside the exam room. After I ended my exam, I still have fifteen minutes left unused.

Don't underestimate the ability of fresh eyes.
Do other things before rechecking your answers. I discovered many wrong answers when I rechecked my answers. That was, when I went to the restroom and had a drink of a glass of water. I'm sure I won't realize what's wrong with my answers if I continuously stared at my answers to each questions at that time.

Put your review book beside your bed
No superstition involved here. In this way you will cover more topics since you'll be reading it more often most likely before sleeping. Reviewing is also effective in making you sleepy. Your sleep will help you review and reviewing will help you sleep. And to you, both are beneficial :)

Reading an SCJP reviewer once is not enough
The reason is quite obvious here. Even with a year of experience in Java programming, it is not a reason that you already know all the topics covered in the exam. Take mock exams that measure your ability for each topic. After reading the book and taking exams, review topics you think you are not really familiar with yet. Then, code as necessary.


More tips when taking the exam:


Eat your meal two hours before the exam
When you eat your meal, your blood supply focuses on your stomach for about two hours during digestion. Your brain needs a lot of oxygen especially when taking the exam. Prevent your stomach from competing with the oxygen your brain needs.

Make an effective habit on your exam time
For sure you know the time of the day you will take the exam right? Why not answer mock exams on the days prior to your exam at the same time of the day of your exam. This will condition your body. The time you take the exam, your body already knows that you will be answering questions again.

Don't schedule your exam on an unholy hour
Perhaps you don't want to take your exam very early. Also, will not schedule it on a time of the day you usually feel sleepy.

Ask permission to God
Things happen if only God allowed it. Why not ask His permission. His decision determines if you'll pass or fail. But wait, just make sure you did your part - reviewed enough for the exam. Ask His protection on the day of your exam. Who knows you'll be sick by day you take it, or you'll be late because of the traffic, etc. It is good to rely to someone who controls everything. Make sure you ask it in Jesus' name. It's the only way you can connect with God.

Initially posted this entry on my multiply.com but multiply has closed my account already.