pottersheep
  • pottersheep
Can someone help explain to me what a method is ?
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
pottersheep
  • pottersheep
For java
pottersheep
  • pottersheep
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?
anonymous
  • anonymous
public static void printName(String name) { System.our.println(name); } not useless?

Looking for something else?

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

More answers

jagatuba
  • jagatuba
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
pottersheep
  • pottersheep
System.out.print - ing isn't consiedered returning a value ?
anonymous
  • anonymous
A method is just a function attached to a specific class of objects.
anonymous
  • anonymous
no, method does not return anything it just prints out to standard output
pottersheep
  • pottersheep
Ok thanks guys I'll try to research a bit more........ugh I hate my teacher.
anonymous
  • anonymous
@Tomas.A a method can return something
anonymous
  • anonymous
im speaking about my example
pottersheep
  • pottersheep
Sorry what exactly does "static" mean ? and what is the opposite of static?
anonymous
  • anonymous
did you learn OOP already?
pottersheep
  • pottersheep
Object Oriented programming ? I read over the definition myself in my textbok but we didnt go indepth
anonymous
  • anonymous
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.
anonymous
  • anonymous
you will learn about non static in OOP
anonymous
  • anonymous
and it's called dynamic lol
pottersheep
  • pottersheep
oh lol I dont think I need to learn that now then....since I never read anything about that.....thank you
tux
  • tux
Method is part of application which does specific task.
jagatuba
  • jagatuba
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.
anonymous
  • anonymous
Dynamic is something like an opposite to static.

Looking for something else?

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