• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

adjectives

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From i've read Interfaces shud typically be adjectives like serializable, Runnable etc...
Then what abt interfaces like Vector, Map,List are they adjectives?

regards,
avs
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sur vee:
From i've read Interfaces shud typically be adjectives like serializable, Runnable etc...


Good point. Then you should read both these discussions
http://c2.com/cgi/wiki?InterfacesShouldBeAdjectives
http://c2.com/cgi/wiki?InterfacesShouldBeNouns

But don't bother, SCJP exam doesn't ask you to differentiate between nouns and adjectives to identify interfaces.
[ September 13, 2007: Message edited by: Srikanth Basavaraju ]
 
Ranch Hand
Posts: 358
Firefox Browser Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interfaces should 'typically' be adjectives. Its not mandatory/compulsory. Most important point while framing interfaces is:
You don't want to provide implimentation details for various reasons. All you wanted to do is provide a contract or more specifically a set of criteria to be followed. Thats it. Interface only deals with criteria. If you think in these terms, you can easily conclude why the interfaces like Map etc. weren't named like adjectives. Map interface provides criteria for map data structure. Any thing that claims to be a map data structure should atleast fulfill the criteria described by Map interface.
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy sur vee,

That's really a good question!

Welcome to JavaRanch

Thanks for the links Srikanth! Also to faisal pasha for the convincing reply.
 
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you are right,
the naming is not perfectly consistent.
There is also an important class with an adjective name:
class Throwable (is not an interface...)



And welcome to the Ranch!


Yours
Bu.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sur vee:
...Then what abt interfaces like Vector, Map, List...


These things happen. It probably seemed like a good idea at the time.
 
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic