This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • 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
Posts: 12196
35
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic