Page 1 of 1

[HD Pg 218, Sec. 8.6.2 - javabeans]

Posted: Fri Feb 15, 2019 2:32 pm
by OCAJO1
If the type of the property is boolean (or Boolean), the name of the getter method may also start with an "is" instead of a "get".

Question,

On the exam - is there a right or wrong answer issue, if a Boolean/boolean getter starts with either one?

Re: [HD Pg 218, Sec. 8.6.2 - javabeans]

Posted: Fri Feb 15, 2019 8:46 pm
by admin
No issue. Both are equally valid.

Re: [HD Pg 218, Sec. 8.6.2 - javabeans]

Posted: Sat May 04, 2024 6:57 pm
by raphaelzintec
hello can you please explain me the technical terms about class because i'm lost with all these terms:

- property
- field
- characteristic
- attribute
- members

it seems that they are all related to everything inside a class: variable, methods, constructors, initializer blocks, inner class

i asked chatgpt and gemini and that's the explanation i got like it's a bit of everything... However i haven't found the exact explanation in the book.

i know it's out of scope for the exam but i wanna know for job interviews

thank you

Re: [HD Pg 218, Sec. 8.6.2 - javabeans]

Posted: Sat May 04, 2024 7:04 pm
by raphaelzintec
btw the person question is very good because i did an non official OCA test at my school and i answeared incorrect... because i got a question like
"what is the correct getter for variable boolean..." and i answeared getBoolean() but correct answear was isBoolean() FOR THEM.

also for boolean they also use getters with "can" such as canSwim(), canEat(), ...

Re: [HD Pg 218, Sec. 8.6.2 - javabeans]

Posted: Sun May 05, 2024 3:23 am
by admin
- property : Please see this: https://docs.oracle.com/javase/tutorial ... rties.html
- field: Any class or instance field.
- characteristic: another term for methods
- attribute: another term for field
- members: fields and methods

Re: [HD Pg 218, Sec. 8.6.2 - javabeans]

Posted: Fri Aug 16, 2024 4:59 pm
by raphaelzintec
hello guys its not the topic but i got OCA!!

we made it!

thanks a lot for all enthuwear team for the support on forum, helped me a lot, mister deskmush for the book (i left review on amazon)!

Re: [HD Pg 218, Sec. 8.6.2 - javabeans]

Posted: Fri Aug 16, 2024 10:18 pm
by admin
Congratulations! Happy to hear that you passed the exam and that our content was helpful.
Thank you for the review.