It seems that developers often use these terms interchangeably when referring to a piece of data stored in an instance of a Class.
Is there any technical difference between each term, or is it fine to use them interchangeably?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Based on the variety of answers, Class “attributes”, “fields”, and “variables” are used relatively interchangeably but have nuanced distinctions that vary from person to person. As such, probably best to lump them together and not rely on the nuances.
There’s consensus that a Class “member” includes methods as well as data, so it is distinct from the others.