[HD Pg 218, Sec. 8.6.2 - javabeans]
Moderator: admin
-
- Posts: 221
- Joined: Mon Nov 26, 2018 2:43 pm
- Contact:
[HD Pg 218, Sec. 8.6.2 - javabeans]
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?
Question,
On the exam - is there a right or wrong answer issue, if a Boolean/boolean getter starts with either one?
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: [HD Pg 218, Sec. 8.6.2 - javabeans]
No issue. Both are equally valid.
-
- Posts: 167
- Joined: Sun Apr 21, 2024 10:43 am
- Contact:
Re: [HD Pg 218, Sec. 8.6.2 - javabeans]
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
- 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
Last edited by raphaelzintec on Sat May 04, 2024 7:24 pm, edited 1 time in total.
-
- Posts: 167
- Joined: Sun Apr 21, 2024 10:43 am
- Contact:
Re: [HD Pg 218, Sec. 8.6.2 - javabeans]
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(), ...
"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(), ...
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: [HD Pg 218, Sec. 8.6.2 - javabeans]
- 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
- field: Any class or instance field.
- characteristic: another term for methods
- attribute: another term for field
- members: fields and methods
-
- Posts: 167
- Joined: Sun Apr 21, 2024 10:43 am
- Contact:
Re: [HD Pg 218, Sec. 8.6.2 - javabeans]
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)!
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)!
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: [HD Pg 218, Sec. 8.6.2 - javabeans]
Congratulations! Happy to hear that you passed the exam and that our content was helpful.
Thank you for the review.
Thank you for the review.
Who is online
Users browsing this forum: No registered users and 14 guests