0
what is an attribute?
4 Réponses
+ 6
Attributes are the things about some thing that defines that thing well.
Eg. If you consider a MobilePhone
then its Prise, Model_no, color, brand name. etc are attributes of that phone .(i.e the things that tell you more about the MobilePhone).
Similarly in Java Or In any OOPs language the things (variables) in that class are called the attributes of that class.
For Above example
public class Mobile_Phone
{
int prise ;
double Model_no;
string colour;
string brand;
}
here Variables "prise,Model_no,colour,brand" are called attributes of class Mobile_Phone.
+ 1
In simple words, attributes are variables..
0
details that describes objects, character etc.....
0
attribute or variable are also known as properties