Hi Christein
Let me try to help you.
objects are known as instances of class.
for example in the following code:
class Box{
....
.....
Box mybox=new Box();
.....
....
}
mybox will be an instance of Box,or a Box object called mybox is created.Each time you create an instance of a class you are creating an object of a class(using new operator).
Also the statement
Box mybox=new Box();
can be written in two steps,
Box mybox;//declares reference to an object,
mybox=new Box();//allocates a Box object
so when I say
StringBuffer test=new StringBuffer("Christein");
an object or instance (named test)of StringBuffer class is created.after
test.insert(5,"al");
the o/p is
Chirstaltein
so we are not creating a new instance of the class,only the contents of the object gets modified.
Hope this helps.