Can someone help explain to me what a method is ?

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.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions.

A community for students.

Can someone help explain to me what a method is ?

Computer Science
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

For java
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?
public static void printName(String name) { System.our.println(name); } not useless?

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

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

Not the answer you are looking for?

Search for more explanations.

Ask your own question