• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is a Static Method?


  • Static methods show have static keyword as the method definition
    Static methods are accessed without creating an instance of the class object
    Static methods will not have “this” functionality to access the method
    Static methods cannot access non static members of the class.undefined



In Java, static denotes class methods and class variables (as opposed to instance methods and instance variables). These methods and variables can be accessed without an instance present. Contrast this to instance methods and instance variables: they must be accessed through an object.



Static methods are created using the static keyword.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Diffrent B/w Static And Dynamic Hosting??? marctrace 3 759 12-23-2013, 05:15 PM
Last Post: rogerlegend
  In Java, what’s the difference between method overloading and method overriding? clerisy 0 692 01-24-2012, 08:14 PM
Last Post: clerisy

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Powered By MyBB, © 2002-2019 MyBB Group.