This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What is a method ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "What is a method ?" Watch "What is a method ?" New topic
Author

What is a method ?

amit sanghai
Ranch Hand

Joined: Dec 05, 2000
Posts: 231

Hi everybody,

Choices :
1)implementation of an abstraction .
2)defines the behaviour.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
I'd say 1, though that answer could also apply to a class.
2 is more correct for an interface, but I think a case could be made to have it apply to a method.
Division by zero, out of cheese error, universe halted.


42
Ajay Patel
Ranch Hand

Joined: Jan 02, 2001
Posts: 39
i would say 2.
Because classes are implementation of abstraction.
Variables define the Properties of a class.
Methods definte the Behaviour of a class.
-Aj
[This message has been edited by Aj Patel (edited January 07, 2001).]
amit sanghai
Ranch Hand

Joined: Dec 05, 2000
Posts: 231

Hi Aj and Jeroen,
This question was from Khalid's mock exam. The answer diven is (2).
Kalidas Pavi
Ranch Hand

Joined: Nov 20, 2000
Posts: 42
Agreed 2.
Methods can be considered as the counterparts of functions of procedural languages. Methods operates upon the data (fields) of a class and hence defines the behaviour of the class.
Kalidas
 
GeeCON Prague 2014
 
subject: What is a method ?