There are no examples of an ideal code, five steps "how to get a certificate with a probability of 100%, guarantee". There are not even photos of cats: /
In the best styles of the genre "Look, I got a certificate!"
It happened ...
In Prague, at the Gopas Testing Center,
Pearson VUE was the mediator. Cost - 245 USD.
It brought me to this ...
Promised at work an increase in salary. I wanted to get
certified for a long time, but always successfully found an excuse for postponing the exam to a "more suitable time."
Patience and a little effort
If you have a Java programming experience (some 1+ years), then no special preparation is needed, review the exam topics and restore possible spaces. Personally, I looked at
sample questions and asked for an exam not to sleep in the morning.
')
Surprises
The following examples do not make the exam difficult, but mentioning them may probably be useful for people who also choose to neglect the preparation.
- Change and transfer the argument in one line , by type
doStuff(i++, ++j, (k+=1));
“And where is the surprise?” You ask.
Yes, nothing complicated, but ... At the beginning of the test there were two or three examples where you just need to determine the result of a method call with similar changes to the arguments. And then somewhere in 15 (the number is very “obvious”), the questions on the arguments were “taunted” differently and the correct answer depended on it, although the example was on a completely different topic. Those. if suddenly for some reason you are confused with the arguments, you will get in addition the disadvantages of inheritance and exception handling, for example.
- == vs. equals
The topic is hackneyed and I assumed that Oracle would like to thoroughly check it, but the number of questions on this topic exceeded my expectations. There were about ten of them (all in all there were 90 questions). We are adults and the operator "==" is usually not used to compare objects, so some nuances are forgotten. Basically it was necessary to evaluate the result of comparing Strings, it was a banal type
String s = "im string"; String s2 = new String("im string"); System.out.println(s == s2); System.out.println(s.equals(s2));
and there was something like
public class HelloWorlder { public String name; public HelloWorlder(String name){ this.name = name; } public static void main(String[] args){ HelloWorlder h = new HelloWorlder("String"); HelloWorlder h2 = new HelloWorlder("String"); System.out.println(h.name == h2.name); System.out.println(h.name.equals(h2.name)); } }
In addition to String's, objects were compared without redefined equals, but this is just a word.
- “Make it encapsulated,” they said.
I came across this three times, always had a class (or two) and offered a choice of several code changes (such as changing the visibility of a variable, adding a method, etc.). Two questions were absolutely normal, but in the third by way of elimination there was one option left - declare a variable with default visibility as final. Encapsulation. I admit that I am missing something, but the other options definitely did not fit.
- Measure seven times
As I guessed from sample questions , a lot of questions were on attentiveness. Examples:
But there is nothing to fear, most of the questions are close to practice. There are interesting questions, I liked the task “select three
bad practices ” from the proposed ones, the initialization of the char array was remembered
char[] array = { 97, 'b' };
it was necessary to remember that 97 is 'a'.
If it seems to you that the certificate is more expensive than the benefits of it, then you can try to negotiate with the employer to pay for it, I personally managed.
Do not forget that 1/2 = 0, thank you for your attention :)
Afterword: When writing a post, I constantly recalled the proverb “Shortness is the sister of talent”.
UPD: all questions from
here link are very similar to real ones