Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Objects Meet Objects Methods

Just to clarify, the fields he is referring to is the instance variable?

Just a little confused when he refers to the variable in a class as a fields because we don't call it that in class, so I wanted to make sure.

1 Answer

Juan Naputi
Juan Naputi
1,772 Points

Yes. The variable he is referring to is a field. Depending on the language, and sometimes the person, it can vary. In Java, I've heard people mainly call them fields. But, in languages like C#, people call them fields or properties based on how they are declared. But, you are also correct in that it is an instance variable.

Thanks for the clarification!