This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Java terminology doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Java terminology doubt" Watch "Java terminology doubt" New topic
Author

Java terminology doubt

Ash Rao
Greenhorn

Joined: Mar 05, 2005
Posts: 2
I would like to know if there is any specific terminology to denote the <extends> or <implements> keywords in a class declaration. i.e

public class Test extends SuperClass {
.........
}

public - access modifier
Test - class name

What would we call the <extends> part of the declaration? I hope my question is not cryptic.

Ash
Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
extends, implements are 'keywords' in Java.
These words are reserved � you cannot use any of these words as names in your programs.
extends - Inheritance
implements - Interfaces

extends always comes before implements in a class decalaration.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

It seems that most programmers refer to these simply as "the extends keyword" or "the implements keyword." The Java Language Specification refers to these as "clauses" -- as in "the extends clause" and "the implements clause." I don't know of anything more.

Ref: http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
"extends" and "implements" by themselves are keywords, while "extends SuperClass" and "implements MyInterface" are examples of an extends clause and an implements clause, respectively.

From an English grammar standpoint, these aren't really clauses, as they don't have subjects. (Not included as part of the "clause" anyway.) But this isn't the first time existing terminology has been distorted in the making of a language specification. I suppose we can think of "extends SuperClass" as shorthand for "...which extends SuperClass" - which would be a clause, in English.


"I'm not back." - Bill Harding, Twister
Ash Rao
Greenhorn

Joined: Mar 05, 2005
Posts: 2
Thx for the response. I guess for now we can accept that the said keywords are merely clauses in a class declaration.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java terminology doubt
 
Similar Threads
constructor question
Generics doubt
Generics - method declarations -from Examlab
Generic Method in K&B Question 14
Generics: Capture two types at once