• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

static,super&this

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic