Forums Register Login

Day 2/ OCA Java SE 8 Programmer I Cert Promo: Prepare for the exam with 'Twist in Tale' exercises

5
+Pie Number of slices to send: Send
Hi Ranchers -

To earn the OCA Java SE 8 Programmer I Certification, you should know your Java inside and out. One of best ways to do that is to write a lot of code.

Because a book can't cover all the possible code combinations on which you can be tested in the exam, I've included 'Twist in the Tale' exercises in my book.

Each chapter includes 4-6 such exercises. For these exercises, I’ve tried to use modified code from the examples already covered in the chapter. The Twist in the Tale title refers to modified or tweaked code. These exercises will help you understand how even small code modifications can change the behavior of your code. They should also encourage you to carefully examine all the code in the exam. The reason for these exercises is that in the exam, you may be asked more than one question that seems to require the same answer. But on closer inspection, you’ll realize that the questions differ slightly, and this will change the behavior of the code and the correct answer option!

To get you going, I've created an example for you to answer:



--------------------------------------
Twist in the Tale - Example 1
--------------------------------------

Given that the following example would concatenate and output the first and second command line parameters:


What happens, if you modify the preceding code to the following:


--------------------------------------
Twist in the Tale - End of Example 1
--------------------------------------

(Next example to follow in an hour.)

With much respect,
Mala





+Pie Number of slices to send: Send
Here's the next question:

--------------------------------------
Twist in the Tale - Example 2
--------------------------------------

Given that the following code will output false:



Do you think the following code will output the same result?



--------------------------------------
Twist in the Tale - End of Example 2
--------------------------------------

Next example to follow soon.

With much respect,
Mala
+Pie Number of slices to send: Send
Here's an example of 'Twist in the Tale' exercises from my book 'OCA Java SE 8 Programmer I Certification Guide':



These exercises encourage you to look beyond the code that you read. It encourages you to see how small changes affect code.

Because this is what you you'll experience in your real life projects.

With much respect,
Mala
This one time, at bandcamp, I had relations with a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3124 times.
Similar Threads
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta
Passed Java SE 8 OCA exam with 85%
wrong answer for review question (Java OCA 8 Programmer I Study Guide)
OCA Java SE 8 - a few basic queries
OCA book question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:08:56.