Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6348119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:21:39+00:00 2026-05-24T21:21:39+00:00

Greeting for the day! I have a question in my mind and looking for

  • 0

Greeting for the day!

I have a question in my mind and looking for answer from some days.
If my understanding is correct then only diff between Instance and object is :-

instance means just creating a reference(copy) .

object :means when memory location is associated with the object( is a runtime entity of the class) by using the new operator

Now i want to know how to create an instance of an object.
Please give explanation with sample code

Any help will be appreciated.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:21:40+00:00Added an answer on May 24, 2026 at 9:21 pm

    By your explanation it’s not called an instance, but a reference of an object. An instance of a class is called an object. I think your question is: “What is the difference of an object and a reference variable?” I’ll try to explain it with some examples:

    Foo f;
    

    I just declared a reference variable. This is not an object but only a reference that refers to an object.

    f = new Foo();
    

    Now I created a new object and assigned it to the f reference variable so every time I do something to f I refer to the Foo object. Like when I call f.Name = "MyFoo"; I refer to the foo object.

    Foo otherFoo;
    

    Now I declare another reference variable.

    otherFoo = f;
    

    What we have here now is having ONE object in the memory but TWO reference variables refering to the same object.

    f.IsFoo = true;
    bool isotherFooFoo = otherFoo.IsFoo;
    

    This last line will return true because we changed the IsFoo property to true and f and otherFoo reffer to the same object.

    I hope that explains you everything. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a greeting card app.I have some existing templates and i also
Greeting to the community. This is my very first question. I had in mind
in jsf2 if we have some function like public String greeting(String gtr) { return
Greeting, fellow programmers, I have a problem.... keep in mind that I'm completely self-taught,
Greeting, how is possible to determine from captured packets using sharppcap if the packet
Greeting! I have the following problem. I have a table with huge number of
I have a Javascript greeting that greets new users with a drop down banner
This is to create a greeting card application and here i have to change
Greetings all... I have a simple, yet annoying question regarding Spring Web MVC. I
Greeting all. I have a SQL 2008 express database, lets name is tbl_Merchant, similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.