File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class and instance?

 
raymond yadao
Ranch Hand
Posts: 88
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just want to know if what's the difference of class methods and instance method? When to use class methods or instance methods?
thanks!

raymond
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use instance methods if the result or side-effects depend on the state or contents of the object. Use class methods if the result depends only on its arguments or on other "static" data.
 
raymond yadao
Ranch Hand
Posts: 88
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Frank Carver:
Use instance methods if the result or side-effects depend on the state or contents of the object. Use class methods if the result depends only on its arguments or on other "static" data.

can you elaborate further or give an examples?
raymond
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic