What is the difference between an instance variable and field in java?

Recommended Answers

All 3 Replies

A field may be an instance variable or a static variable.

Dear PhoenixInsilico,

JamesCherrill's anwer is appropriate.
- A field may be an instance variable or a static variable.

They are variables but used in different context.

commented: you repeat other people's answers a lot. -1

They are variables but used in different context.

And what is that suppose to mean ? Not to mention JC had already given the answer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.