A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

pottersheep

  • 5 years ago

Can someone help explain to me what a method is ?

  • This Question is Closed
  1. pottersheep
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    For java

  2. pottersheep
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't really get return key..........how we put void if it doesn't return a value.........if it doesnt return any value doesnt that make the method useless?

  3. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    public static void printName(String name) { System.our.println(name); } not useless?

  4. jagatuba
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    A method in any object-oriented programming language is the actions that an object can perform. The main method does not return a value but it is essential to any program

  5. pottersheep
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    System.out.print - ing isn't consiedered returning a value ?

  6. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    A method is just a function attached to a specific class of objects.

  7. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    no, method does not return anything it just prints out to standard output

  8. pottersheep
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Ok thanks guys I'll try to research a bit more........ugh I hate my teacher.

  9. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    @Tomas.A a method can return something

  10. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    im speaking about my example

  11. pottersheep
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Sorry what exactly does "static" mean ? and what is the opposite of static?

  12. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    did you learn OOP already?

  13. pottersheep
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Object Oriented programming ? I read over the definition myself in my textbok but we didnt go indepth

  14. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    The main method of the program has the reserved word static which means it is allowed to be used in the static context. A context relates to the use of computer memory during the running of the program. When the virtual machine loads a program, it creates the static context for it, allocating computer memory to store the program and its data, etc.. A dynamic context is a certain kind of allocation of memory which is made later, during the running of the program. The program would not be able to start if the main method was not allowed to run in the static context.

  15. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    you will learn about non static in OOP

  16. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    and it's called dynamic lol

  17. pottersheep
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    oh lol I dont think I need to learn that now then....since I never read anything about that.....thank you

  18. tux
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Method is part of application which does specific task.

  19. jagatuba
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    Methods are the tasks or actions that an object can perform. Going back to my Corvette example that I used in explaining object instances, moving forward or backward are examples of the methods that a Corvette object can perform. Turning left and right are also methods. Methods are often inherited from a superclass. For example, Corvette could be a subclass of the superclass Car. The class Car has generic methods that apply to all car objects and are inherited by any subclass of Car (Corvette, Legacy, Lancer, ect.) The objects of these subclasses can use the inherited methods of Car and the additional methods that are offered by its subclass. Shifting the example, let's say we still have the class Car, but we have a subclass Convertible. Instances of Convertible can go forward and backward as can any instance of Car or subclass of Car, but only instances of Convertible can put their top down because that is a unique method of Convertible.

  20. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Dynamic is something like an opposite to static.

  21. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

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.