File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the meaning of instance and instance variables

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does instance mean in corejava
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal Hegde wrote:what does instance mean in corejava

As per Wikipedia,
In object-oriented programming with classes, an instance variable is a variable defined in a class (i.e. a member variable), for which each object in the class has a separate copy.
An instance variable is the opposite of class variable, and it is a special type of instance member.

Similarly, non-static field in your program would be your instance variable because their values would be unique to each instance of a class .

Also, I think "instance" keyword is same as "instance variables" in the context of Java
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic