Forums Register Login

Question about Q2-1 in Gupta OCA Java 7 book - Chapter 2 - Working with Java data types

+Pie Number of slices to send: Send
Hey all,

I hope everyone is doing well. I recommend watching lots of MST3K for lots of uncontrollable lols.

Anyways apparently this is an incorrect statement:

Once assigned, the value of a primitive can't be modified.


This is also an incorrect statement:

A value can't be assigned to a primitive variable



The first one seems like it should be correct because primitive variables can be incremented and decremented with ++ and -- operators etc.
The second one seems like it should be correct because a primitive variable like int x is designed to hold different values like 1 or 1000 or 100_000 or any thing in its range.

What am I missing?

Really Confused,

Ted
1
+Pie Number of slices to send: Send
The questions asks to select all incorrect statements. So the answers b, c & d are the incorrect statements and should be selected to answer this question correctly.
+Pie Number of slices to send: Send
 

Roel De Nijs wrote:The questions asks to select all incorrect statements. So the answers b, c & d are the incorrect statements and should be selected to answer this question correctly.



Wow, I just checked the book and I think your statement is correct. For some reason I had problems understanding the basic instructions. I seemed to select one blatant wrong answer and left the other blatant wrong answers alone as if the objective of the question changed half way through me answering it to selecting only correct statements.

I was tired when I wrote this post last night and took the practice exam. Hopefully, I will think with more brain cells when I take the OCAJ7. Thank-you Roel De Nijs for helping me understand where I went wrong.

Losing my brains,

Ted
2
+Pie Number of slices to send: Send
Reading the question correctly is sometimes already 50% of answering it correctly

On the exam you'll have a little bit of help, because each question mentions the number of correct answers.
Trust God, but always tether your camel... to this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 734 times.
Similar Threads
Don't understand answer in OCA Java SE7 by Mala Gupta
OCA Java SE 8 - a few basic queries
Code Query? (OCA SE 7 1, Pearson IT oca video guide by Simon Roberts)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 17:07:45.