• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what would these be considered?

 
David Triple
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 12101
30
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
vineet dhar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic