aspose file tools*
The moose likes Beginning Java and the fly likes what would these be considered? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what would these be considered? " Watch "what would these be considered? " New topic
Author

what would these be considered?

David Triple
Greenhorn

Joined: Jul 05, 2011
Posts: 20
public void render - is this a class or object?

public void addVertice- is this a class or object?

public TGObject(TGObject o) { - is this a class or object?

public TGObject() { - is this a class or object?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11480
    
  16

The first two look like method declarations to me.

the second two look like constructor declarations.

So, I would say the answer to all four is "No".


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
vineet dhar
Greenhorn

Joined: Aug 17, 2011
Posts: 23
David Triple wrote:public void render - is this a class or object?

public void addVertice- is this a class or object?

public TGObject(TGObject o) { - is this a class or object?

public TGObject() { - is this a class or object?


classes don't have a return type ...like you have givenin the first example...it is a method.
the syntax for class is
class classname
{
//code
}

The second one it seems is the constructor for class TGObject...and it is a parameterized constructor ...similarly for the third one also it is a non parameterized constructor.....for your class TGObject...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what would these be considered?