• Post Reply Bookmark Topic Watch Topic
  • New Topic

Programming Fundamentals  RSS feed

 
Saumya Tiwari
Greenhorn
Posts: 1
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, one thing i didn't know clearly is the difference between instance and object? any help will be greatly appreciated.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

The terms "instance" and "object" refer to the same thing. An object is an instance of a class - the word "instance" relates an object to its class. For example, a String object is an instance of the class String.

A class is a blueprint to create objects - it's what describes what data objects of that class contain, and what operations you can call on those objects.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!