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




 
#1

  • 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




Reply




 
#2

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.



Reply




 
#3

Static methods are created using the static keyword.




Reply


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Powered By MyBB, © 2002-2017 MyBB Group.