Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Kl0ze

Generally, what is the difference between static and non static? Specifically, what is the difference between static methods and non-static methods?

  • one year ago
  • one year ago

  • This Question is Closed
  1. valmach
    Best Response
    You've already chosen the best response.
    Medals 0

    Static.. permanent .. not static.. is not set in stone.. as applied to what exactly?

    • 11 months ago
  2. anoop27
    Best Response
    You've already chosen the best response.
    Medals 0

    Static=fixed(that never changes) example=person Name,Date of birth Non-Static= not fixed example=Age,Address etc.

    • 11 months ago
  3. WhoElseButMe
    Best Response
    You've already chosen the best response.
    Medals 1

    non static must be instantiated first MyClass mc = new MyClass(); now you can use MyClass(). static doesn't require instantiating the object first. But keep in mind a static method can't access instance methods or variables of the class. MyClass.DoWork(); where do work is a static method found inside MyClass().

    • 11 months ago
  4. akhaliq99
    Best Response
    You've already chosen the best response.
    Medals 0

    Static is shared across classes, you dont have to create instances for each class

    • 11 months ago
  5. WhoElseButMe
    Best Response
    You've already chosen the best response.
    Medals 1

    @akhaliq You can have private static methods too.

    • 11 months ago
  6. akhaliq99
    Best Response
    You've already chosen the best response.
    Medals 0

    true

    • 11 months ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.