What is the difference between object, instance, referance?

What is the difference between object, instance, referance of a class? write some code for that, that will be easy to understand for me.
Thank you.

petes1234 wrote:
paul.miner wrote:
You'll get a more useful reply if you ask a better question. As it is, your question is overly broad and vague. I beg to differ. I found it direct and to the point: "Please do my homework".I too found it direct but not like that.
I translated the request as "I am just starting to learn Java and don't understand any of the basic concepts. Could I please have some code that could maybe explain this concepts more clearly so that I can get a practical sense of them?"
And the answer is... the tutorial.
I agree the second sentence reads to you and I (and probably others) as demanding, but I think it's just an ESL issue. He/she at least said thanks.

Similar Messages

  • In TCA, what is the difference between Item instance owner and System's own

    Hi,
    In TCA, what is the difference between Item instance owner and System's owner ?
    thanks
    siva

    ...can i make as many iweb websites as i want? ...and as many blogs as i want? ...i have never made one before....
    ....although, i do have my own small business and i do have a website that i paid a guy to make and also host....(which is a waste of $$$$ in my opinion as i think i can do a better job making one myself through iweb) ....
    ...anyways, i know it is splitting hairs but what exactly is the diff b/w a blog and a website ....i am under the impression that a blog is just a personal newsletter sort of thing,...?

  • What is the difference between Object Outline Stroke, Object Expand..., and Object Compound Path/Make?

    Could anyone explain the differences between these three commands? I created a circle with a stroke, applied all three commands, and ended up with the same thing, a compound path. Are there situations where this is not the case, or situations where one of these commands is more appropriate?

    Cleveland,
    In the case of the straight stroke/nofill, object>outline stroke and object>expand seem to do the same thing.
    In the Layers palette you can see the three different outcomes for Expand if you have both Fill and stroke ticked, only Fill ticked, and only Stroke ticked. Only the last one corresponds to Outline Stroke.
    You should use Outline Stroke as the simplest one if that is what you need. Compound Path is for creating something with one or more holes from multiple paths, or for collecting paths to forrm the Clipping Path of a Clipping Mask. Expand is for the rest.

  • What is the differences between object and other variables?

    For example:
    Object[ ] mm=new Object[10];
    int[ ] mm=new int[10];
    what are their differences??? How to use them correctly??
    Thank you very much!!

    Would you please explain deep about it ?????
    the most important is when to use object and when to
    use other primitive data type
    (int,float,long,double)??
    Thank you very much!!!Each type, whether primitive or object, models some idea or thing or abstraction.
    Use primtives when you just need raw values with no behavior. If you need an integer number, you'll generally use int, sometimes long, rarely short.
    Use objects when you need the concepts they model--String when you want a string of text, Date when you want to represent a date, whatever class you create (Person, Student, Car, Whatever) when you need to use or manipulate the concepts they model.
    Use the object wrappers for the primitives--Integer, Double, etc.--when you want to represent the number but you're using it in a context where objects are required--e.g. when adding them to a collection.

  • What is the difference between Instance variable and Global variable?

    Hi folks,
    Could you please explain me, "what is the difference between Instance variable and Global variable?"
    Are they really same or not?
    --Subbu                                                                                                                                                                                                                                                                                                               

    Hi flounder,
    I too know that there is no such a term GLOBAL in java.
    generally people use to say a variable which is accessible throught out the class or file has global access
    and that will be called as a global variable...
    my point is very much similar to what Looce said.
    In simple that is not a technical term, but just a causual term.
    In technically my question is, "What is the difference between a instance variable and public variable?".
    Hi looce,
    Thanks for the reply. even thats what my understanding too....in order to confirm that i raised this question..
    Your reply has given a clear answer...... thanks again.
    --Subbu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • What is the difference between acquiring lock on a CLASS and OBJECT (instance) of that class

    What is the difference between acquiring lock on a CLASS and OBJECT (instance) of that class

    What is the difference between acquiring lock on a CLASS and OBJECT (instance) of that class
    The Java Tutotials has several trails that discuss both implicit and explicit locking, how they work and has code examples.
    The Concurrency trail has the links to the other sections you need to review
    http://docs.oracle.com/javase/tutorial/essential/concurrency/index.html
    The Synchronized Methods and Intrinsic Locks and Synchronization trails discusse Synchronized Methods and Statements
    http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html
    And the Lock Objects trail begins the coverage of explicit locking techniques.
    http://docs.oracle.com/javase/tutorial/essential/concurrency/newlocks.html

  • What's the difference between a not-initialed object and a null object

    hi guys, i wanna know the difference between a not-initialed object and a null object.
    for eg.
    Car c1;
    Car c2 = null;after the 2 lines , 2 Car obj-referance have been created, but no Car obj.
    1.so c2 is not refering to any object, so where do we put the null?in the heap?
    2.as no c2 is not refering to any object, what's the difference between c2 and c1?
    3.and where we store the difference-information?in the heap?

    For local variables you can't have "Car c1;" the compiler will complain.That's not true. It will only complain if you try to use it without initializing it.
    You can have (never used, so compiler doesn't care):
    public void doSomething()
       Car c1;
       System.out.println("Hello");
    }or you can have (definitely initialized, so doesn't have to be initialized where declared):
    public void doSomething(boolean goldClubMember)
       Car c1;
       if (goldClubMember)
           c1 = new Car("Lexus");
       else
           c1 = new Car("Kia");
       System.out.println("You can rent a " + c1.getMake());
    }

  • What's the difference between global variables and instance variables?

    hi im just a biginner,
    but what is the difference between these two?
    both i declare them above the constructor right.
    and both can access by any method in the class but my teacher said
    global variables are not permitted in java....
    but i don't know what that means....and i got started to confuse these two types,,
    im confusing.......
    and why my teacher said declaring global variables is not permitted,,,,,,
    why.....

    instance variables are kindof like Global variables. I'm not surprised you are confused.
    The difference is not in how they are declared, but rather in how they are used.
    There are two different "styles" of programming
    - procedural programming.
    - object oriented programming.
    Global variables are a term from Procedural programming.
    In this style of programming, you have only one class, and one "main" procedure. You only create one instance of the class, and then "run" it.
    There is one thread of control, which goes through various methods/procedures to accomplish your task.
    In this style of programming instance variables ARE "global" variables. They are accessible to all methods. There is only one instance of the class, and thus only one instance of the variables.
    Global variables are "bad" BECAUSE you can change them in any method you like. Even from places that shouldn't have to. Also if you use the same name as a global variable and a local variable, you can cause great trouble. This can lead to very subtle bugs, as the procedures interact in ways you don't expect.
    The preferred method in procedural programming is to pass the values as parameters to the methods, and only refer to the parameters, and local variables. This means that you can track exactly what your method is doing, and what it affects. It makes it simpler to understand. If you use global variables in your methods, it becomes harder to understand.
    So when are instance variables not global variables?
    When you are actually using the class as an Object, rather than just a program to run. If you are creating multiple instances of an object, all with different values for their instance variables, then they are not global variables. For instance you declare a Person object with an attribute "firstname". Your "main" program then creates many instances of the Person object, each with their own "firstname"
    I guess at the end of all this, it comes down to definitions.
    Certainly you can write procedural code in java. You can treat your instance variables, for all intents and purposes like global variables.
    I can only think to show a sort of example
    public class Test1
       User[] users;
       public void printUsers(){
         // loop through and print all the users
         // uses a global variable
          for(int i=0; i<users.length; i++){
            users.printUser();
    public void printUsers(User[] users){
    // preferred method - pass it the info it needs to do the job
    for(int i=0; i<users.length; i++){
    users[i].printUser();
    public Test1(){
    User u1 = new User("Tom", 20);
    User u2 = new User("Dick", 42);
    User u3 = new User("Harry", 69);
    users = new User[3];
    users[0] = u1;
    users[1] = u2;
    users[2] = u3;
    printUsers();
    printUsers(users);
    public static void main(String[] args)
    new Test1();
    class User{
    String firstName;
    int age;
    public User(String name, int age){
    this.firstName = name;
    this.age = age;
    public void printUser(){
    // here they are used as instance variables and not global variables
    System.out.println(firstName + " Age: " + age);
    Shit thats a lot of typing, and I'm not even sure I've explained it any good.
    Hope you can make some sense out of this drivel.
    Cheers,
    evnafets

  • 1)Now I use Lightrom 5.7 how to upgrade to 6 or CC? 2) What is the difference between 6 and CC vercion? 3) When I used lightromm 3, I could see inEXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is ve

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    2) What is the difference between 6 and CC version?
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    Purchase the standalone upgrade from here: Products
    Download CC version from here: Explore Adobe desktop apps | Adobe Creative Cloud
    2) What is the difference between 6 and CC version?
    See this comparison chart: Compare Lightroom versions | Adobe Photoshop Lightroom CC
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?
    Rob Cole's ExifMeta plugin displays the Subject Distance field (and much more).  Unfortunately, his Web site appears to be down again.  He used to be very active here, but he hasn't posted in several months.

  • What are the differences between PD objects and PA objects?

    can any one tell me What are the differences between PD objects and PA objects?

    PA is based on Infotypes 0000-0999. PD is based on Infotypes 1000-1999, chief being Objects Infotype 1000. Objects Infotype is the source of different Object Types such as Person, Position, Org Unit etc. You can check that through transaction OOOT.
    Regards
    Lincoln

  • What are the differences between inactive and active ABAP objects?

    Can anybody tell me what are the differences between inactive and active ABAP objects?
    In my opinion,  an active object is compiled and system wide available, that means the system do not have to compile the program again before run or use the object. While An inactive object is not system wide available and every time you run an inactive object, firstly the abap runtime will have to  generate a tempory runtime object and this inactive object can not seen by others.
    Am I right? Can anybody kindly tell me other differences?

    Hi,
    "When it is inactive, it is like it would not exist at all:" no - it's like it only exists to you
    "If we just saved that one means it is stored in application server not in database": no - the inactive version is also stored in the database. You can log off and log on and it will still be there, in its inactive status.
    "Only active objects can be executed.": no - inactive objects can be executed by you
    When you create or modify a program, it is inactive until you activate it.
    With a change, there are two versions of the program stored in the database - the active version (as it was before you made your change), and the inactive version. If you attempt to run the program, you'll run the inactive version - the one with your changes. Everyone else on the system will run the active version.
    In this way, you can make changes without affecting anyone else.
    Once you activate your program, then the inactive version becomes the active version.
    With a create, there is no active version, until you hit the activate button. This means ONLY you can run the program.
    An additional benefit of this model, is that if you make a change, save it, and then change your mind without activating, you can recover the active version into the editor, using version management.
    A downside is that sometimes you have to activate your change before you can test it, if it interacts with other, active, programs.
    Regards,
    Kumar

  • What is the difference between 0040 - Objects of Loan & 0045 Loans.

    Hi Experts,
    What is the difference between 0040 - Objects of Loan & 0045 Loans.
    Appreciate your early response.
    Regards
    Rajesh

    Try to check the previous threads you will find by yourself

  • What is the difference between data base objects and runtime objects

    What is the difference between data base objects and runtime objects

    Hi raja,
    data base objects means u can have the presence of these objects in the database.So the tables,searchhelps,structures,lockobjects comes under these ones.
    Runtime objects are created and destroyed after the program ends, any changes we make to them are temporary only.
    regards,
    nagaraj
    Message was edited by: nagaraj kumar nishtala

  • What is the difference between the object&realationship.

    1.what is the difference between the object&realationship.

    What is the difference between "cost object" and
    "cost center"? Please see the context below. It says
    that cost object and cost center are not the same.
    Cost objects :
    The units of output resulting from the value-added process with which costs are identified according to how they are incurred.
    Cost objects can be independent entities (called cost object IDs), or they can represent other entities (such as orders or projects).
    The functions of preliminary costing, simultaneous costing, and final costing can be performed on cost objects.
    The following cost objects can be used in the SAP System:
    Product cost collectors
    Production orders
    Process orders
    Cost object IDs
    Sales order items
    Cost center is an controlling object and Cost object is also one of the controlling objects. Other controlling objects are
    Cost centers (for account assignment of costs)
    · Orders
    · Projects
    · Networks
    · Make-to-order sales orders
    · Cost objects
    · Profitability segments
    · Real Estate Objects
    · Business Processes
    Primary costs are transferred from external
    accounting and classified according to managerial
    accounting perspectives. If the primary costs are
    direct costs, then they are assigned to cost objects.
    Need not be. They can be assigned to any of the controlling obejcts. Generally for primay costs we use Cost center as the controlling object. we can also use IO in which case u have to resort to peridic or full settlement. Apart from Cost center other objects require either periodic or full settlement of the cost collected.> If they are overhead costs, then they are assigned to
    cost centers or overhead cost orders. The system then
    allocates them using internal allocation techniques,
    according to their source
    Cost centers or other objects collects theprimary costs and then can be allocated to other objects based on the sender receiver relationship u define.

  • What is the difference between StringBuffer and StringBuilder objects

    hi ,
    Please tell me what is the difference between stringBuilder and stringBuffer classes ..why stringbuffer classes is used more with multiple threads but not stringBuilder which is faster than stringBuffer objects
    Thanks in advance

    Odd. You answer your own question by paraphrasing the first paragraph of
    StringBuilder's javadoc:
    This class provides an API compatible with StringBuffer, but with no guarantee
    of synchronization. This class is designed for use as a drop-in replacement for
    StringBuffer in places where the string buffer was being used by a single thread
    (as is generally the case). Where possible, it is recommended that this class
    be used in preference to StringBuffer as it will be faster under most
    implementations.
    Do you really have a question?

Maybe you are looking for

  • HT1600 Turned on apple tv first generation - - -no sound

    Just started up the Apple TV to play a movie.   Had not used it in about 3 weeks - - - today - - -no audio whatsoever. What is the solution?   If I reset will I lose items stored on the Apple TV which is first generation.

  • Video camera wont connect

    i have just got a power mac g4 and installed ilife on it but i cant get my camera to connect to imovie. the camera is a canon mv901 and i am trying to connect it through a fire wire connection. every time i try to connect it imovie just tells me ther

  • Anyone with problems with Dreamweaver?

    hi Dreamweaver hangs on startup of the application. Does anyone else have this problem? I've heard there are problems with DW and OS 10.5.7. I've searched online, disabled the startup menu as suggested, but still hangind when I try and open an html d

  • Creating an array from a csv

    Hi all, I am currently working on a basic app for a masteres dissertation where I am looking to input a number of map pins within the map kit from a csv file I have. The file is in my resources and I have map kit up and running but being an archaeolo

  • Oil paint filter

    I just wanted to let all you folks developing Photoshop how angering and frustrating it is when you remove a feature or a filter without making it clear to your users ahead of time. I never would have updated Photoshop had I known the Oil Paint filte