aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes JavaBeans Naming : Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "JavaBeans Naming : Question" Watch "JavaBeans Naming : Question" New topic
Author

JavaBeans Naming : Question

Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707


Is this valid JavaBeans naming way?

What I suppose (What K*B say), it is wrong due to mismatch:
"WibbleListener and BurbleListener"

One question running in mind:
Isn't like BurbleListener may be subclass of WibbleListener so allowed!!!


Please make it clear!

Source of the question: WhizLab
cmbhatt
[ April 15, 2007: Message edited by: Chandra Bhatt ]

cmbhatt
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Hi,



I hope I can paste in this two lines from page ten of K&B without breaking any copy right rules :
Examples of invalid JavaBean method signatures are: (...)
public void addXListener(MyListener m) // listener type mismatch

I don't think, it matters whether they are subclasses, because this convention are about naming. Class hierarchy is of no interest here.


Yours,
Bu.
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Burkhard,

Your answer is, what I supposed to be. But one of famous mock exam simulation
exam says it correct naming. Doubt arose from that point!


Thanks,
cmbhatt
[ April 15, 2007: Message edited by: Chandra Bhatt ]
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Aha,

now I'm stuck as well.

Bu.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaBeans Naming : Question
 
Similar Threads
Is this wrong?(Doubt in K&b, ch-1)
Question On SCJP 5.0 Objective 1.4
why use beans in JSP
Is EJB same as NetBeans?
JavaBeans standard method name?