Java OCA OCP Practice Question 768

Question

Which of the following are valid JavaBean signatures?

Choose three.

A.   public byte getValue(String nose)
B.   public void setValue(int head)
C.   public String getValue()
D.   public long isValue()
E.   public void trimValue()
F.   public boolean isMyValue()


B, C, F.

Note

Option A is incorrect because a getter should not take a value.

Option D is incorrect because the prefix is should only be with boolean values.

Option E is incorrect because gimme is not a valid JavaBean prefix.

Options B, C, and F are each proper JavaBean method signatures.




PreviousNext

Related