Hi all,
What is the difference between object & Instance in Java??
Thanks in Advance
-Hamsa
11 2030
Hi all,
What is the difference between object & Instance in Java??
Thanks in Advance
-Hamsa
Some believe that an object is a specific/particular form of an instance.
I believe that an object is an instance of a class.
What do you believe?
Some believe that an object is a specific/particular form of an instance.
I believe that an object is an instance of a class.
What do you believe?
hi,
only half i got from ur explanation.. bit confusing...
it ll be useful if u explain with any example please..
-Hamsa
hi,
only half i got from ur explanation.. bit confusing...
it ll be useful if u explain with any example please..
-Hamsa
Which part is confusing you?
Hi all,
What is the difference between object & Instance in Java??
Thanks in Advance
-Hamsa
What you have, tell me first.
Explain with some examples what concept you have already.
Kind regards,
Dmjpro.
To me 'object' and 'instance' are synonyms; 'instance' sounds a bit spiffier though.
The class is the blueprint and the object/instance is an instantiation (sic) of the blueprint.
kind regards,
Jos
Hi all,
What is the difference between object & Instance in Java??
Thanks in Advance
-Hamsa
Hi
as I understood so far Objects are derived from class and Instance is the process/mechanism which creates an object. Tell me where do you have confussion.
Hi
as I understood so far Objects are derived from class and Instance is the process/mechanism which creates an object. Tell me where do you have confussion.
You're talking about "instantiation" here (the process of creating an instance of
a class, the instance is synonymous to an "object").
kind regards,
Jos
Hi all,
What is the difference between object & Instance in Java??
Thanks in Advance
-Hamsa
An instance is an object with state. All pencils have erasers and lead. But one pencil I hold in my hand, this instance of this pencil has a pink eraser and sharp point. My brother's pencil has a blue eraser with ear wax on it (yes, pencils can be used as que tips), bite marks, and a dull point. They are both objects of the same class but different instances.
I hope that helps.
An instance is an object with state.
Huh? You're confusing terms here. An object can have state but it needn't; it is
still an instance of some class.
kind regards,
Jos
An object can have state but it needn't; it is
still an instance of some class.
kind regards,
Jos
An object always have a state of some sort. I might be using the term more abstractly than I should. I see it as something that seperates one instance from another instance. Even a difference in memory address could be considered as a different state, in my mind. Furthermore, all objects have an initialized state even if they don't have instance variables.
An object always have a state of some sort. I might be using the term more abstractly than I should. I see it as something that seperates one instance from another instance. Even a difference in memory address could be considered as a different state, in my mind. Furthermore, all objects have an initialized state even if they don't have instance variables.
I was responding to this:
An instance is an object with state.
That implies that an object needn't have state while an instance has state. IMHO
an ojbect is an instance; both are a 'realization' of a class. I'm running out of
synonyms here.
kind regards,
Jos
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Patrick |
last post by:
I want to achieve the following behaviour but I am having trouble
getting there...bare with me im knew to c++ , so its probably rather
trivial!
To have a class ClassA, and composed within this...
|
by: Jean Stax |
last post by:
Hi !
A couple of pretty basic questions:
Value types:
As far as I understand, when I create value type without "new" syntax
the object is considered as unutilized. Consequently, I have to...
|
by: yop |
last post by:
All
When I try to get the text from my listbox I am get an
error which is listed below.
Any ideas?
Thanks
Object reference not set to an instance of an object.
|
by: Chris Murphy via DotNetMonster.com |
last post by:
Hey guys, I've been hitting a brick wall with a problem I've come accross
in developing an application.
Background:
The application uses one primary class that I'm trying to implement with
the...
|
by: Dica |
last post by:
Hi all
I've got a java microEdition client trying to make soap requests to my .Net
service. i keep getting "Server was unable to process request..." err msg
when attempting to make the request....
|
by: AMP |
last post by:
Hello,
I want to use a ready made class (ie a System.Drawing .Pen) and make it
available to my entire application, but I'm getting stupid.
How do I do this? Or point me in the right direction....
|
by: gg9h0st |
last post by:
i worte a simple code below.
------------------------------------------------------------------------------------
#include "stdafx.h"
class Object {
public:
int a;
|
by: Joe |
last post by:
I am just starting to use Object Oriented PHP coding, and I am seeing
quite often the following (this example taken from a wiki):
$wakka =& new Wakka($wakkaConfig);
What exactly is the =&, and...
|
by: dolittle |
last post by:
Hi,
I'm embedding a last.fm flash widget.
I want to be able to remove it from the page using javascript.
I've tried to delete the html element that contains the code but it keeps playing in...
|
by: =?Utf-8?B?Q2hhcmxlcw==?= |
last post by:
I'm running VS2008 & attempting to solve a problem I've encountered while
developing some software for our business.
Here's the basic idea...I've created a class that represents a file (with...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |