Behavior (also known as Behaviour) refers to the actions or reactions of an object or organism, usually in relation to a stimulus or its environment. Behavior encompasses all responses, whether these are conscious or unconscious, overt or covert, and voluntary or involuntary.
The field in biology devoted to the study of animal behavior is called ethology. However, other fields also deal with animal behavior, such as behavioral ecology, neuroethology, and comparative psychology. Behavior in animals and humans is controlled by the endocrine system and the nervous system. In animals, a more complex nervous system can generate more nuanced and varying behaviors, due to the greater number of computational possibilities.
Human behavior is generally considered a subfield of psychology; however, sociobiology and evolutionary psychology address human behavior from the perspective of animal behavior. In psychology, behaviors are divided into the subsets of common and unusual or acceptable and unacceptable.
In sociology, social behavior deals with human behavior in groups. More generally, social behavior refers to behaviors taking place between members of the same species.
In computer science, behavior is an anthropomorphic construct which refers to activities carried out by a computer, computer application, or computer code in response to stimuli, such as user input. "A behavior" is also a reusable block of computer code or script that, when applied to an object (computer science) causes it to respond to user input in meaningful patterns or to operate independently. This terminology is often used especially in reference to graphical objects.