Daniel Lobo

Greenhorn
+ Follow
since Mar 23, 2017
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Daniel Lobo

Tim Cooke wrote:Congratulations Daniel. Well done!

Be sure to add yourself to our OCA Wall of Fame.



Thanks Tim! I included my name there =)
6 years ago
Hi all,

I just got my first certification: OCA Java SE 8 with 95%. I'm proud of my achievement, and I want to share with everyone the steps that I took.

I read the OCA Java SE 8 Programmer I Certification Guide from Mala Gupta. This is a really good book that I recommend. It has good examples that are easy to understand. I read the whole book and did all exercises. I passed the mock example from the book with 81%.

My next step was to buy a license of Enthuware. I took all tests. See my scores below:

Test 1: 71%
Test 2: 72%
Test 3: 77%
Test 4: 77%
Test 5: 68%
Test 6: 88%
Last day test: 82%

The tests from Enthuware helped me a lot because I reviewed everything that I didn't get right. I think that the tests from Enthuware are more difficult than the real exam.


Next step: prepare for OCP =)
6 years ago
Hi Mala,

Thanks for replying!
I have learned a lot by reading your book =)

I found another issue in page 260.

See what the books says:

Examine the definition of the following no-argument constructor defined in the class ArrayList.java:



However, the constructor code is:



Where DEFAULTCAPACITY_EMPTY_ELEMENTDATA is:



Thus, array list is created with size 0. The size is only increased to 10 when adding the first element. When adding the first element, the code will check the capacity. The argument to ensureCapacityInternal will be 1 (size 0 + 1). As the elementData is equals to DEFAULTCAPACITY_EMPTY_ELEMENTDATA, the capacity will be the greater value between 1 and default 10. So 10 will be the new size! See the code below.




ps: I'm using jdk1.8.0_121.

Regards,
Daniel Lobo
Congratulations Miguel!
Being from a different major and taking the exam in a foreign language is very challenging. Great job
Hi all,

I found an error in Mala Gupta's OCA Java SE8 (page 238).

See page 238:



In the preceding code, the call to lang1.substring() and lang2.subtring() will return "Ja".

The call to lang1.substring() and lang2.subtring() will return "J" instead of "Ja" because the substring method doesn't include the character at the end position (1) so only the position 0 ("J") will be returned.