0
Difference between fields and variables(java)
Can anyone explain to me what is main diff between variable and field in java with examples...
3 Réponses
0
a field A data member of a class. Unless specified otherwise, a field is not static.
and Variable is An item of data named by an identifier. Each variable has a type, such as int or Object, and a scope. See also class variable, instance variable, local variable.
0
A field is a variable property of a class. It's like variable but for a class.
Also called attribute
https://www.sololearn.com/learn/Java/2218/