File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static,super&this

 
geet
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please do help me on static , this and super . correct me if i am wrong. super method in a subclass hold the value of it's(subclass) immediate superclass. static methods belong to a class ,what does this mean.i do have a rough idea. but please clear me on this.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
geet, you'll be asked to change your name to the JavaRanch standards. Until then, in a nutshell:
this is a reference to the instance of the object that a non-static method is executing against.
super is a way to reference the superclass from which the current class is dervied. It could be used to differentiate between identifiers that are the same in the derived and super classes. When used as a method name in a constructor, it references the constructor of the superclass.
static is a keyword that specifies that a member or method does not "belong" to a specific instance of the class, but to the class as a whole. Hence, within a static method, there is no this.
hth,
bear
 
Dave Vick
Ranch Hand
Posts: 3244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
geet
This the second time I have asked you to read and comply with our naming policy here at the ranch.
Your account has been locked.
Please re-register and make sure your display name is an appropriate name as shown in the policy.
[ March 13, 2002: Message edited by: Dave Vick ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic