What is the use of mutable Objects ?

Hi all,
I want to know the use of mutable objects?
Could u please help me ?
regards,
Nalini

public class Sum {
    double value;
    public void add(double d) {
        value += d;
}The sum class is mutable, since you can change it's value. The Integer class is an example of a class that's immutable. You can't change the value of an Integer after you have constructed the object.
/Kaj

Similar Messages

  • What is the use of Adapter objects in I.R

    what is the use of Adapter objects in I.R

    congratulations you successfully opened 1000 new threads...
    adapters are components of the adapter engine, their main action is to connect different sysems with each other. therefore are different adapters:
    SAP-2-SAP Adapters: like IDoc and RFC
    SAP-2-NOT-SAP-ADapters: like JMS, JDBC, HTTP..
    and B2B Adapters...
    there are some rules in any board that you should accept:
    use search first
    use the sap help http://help.sap.com/
    and read the forum rules
    regards cc

  • What is the use of passing object reference to itself ?

    What is the use of passing object reference to itself ?
    regards,
    namanc

    There is an use for returning an object reference from itself, for instance:
    class C {
    public:
         C append(C c) {
             // do something interesting here, and then:
             return this;
    }You can "chain" calls, like this:
    C c = new C();
    C d = new C();
    C e = new C();
    c.append (d).append (e);Maybe the OP has "inverted" the common usage, or thought about a static method of a class C that requires a parameter of type C (effectively being a sort of "non-static method").
    class C {
        static void doAnotherThing (C c) {
            c.doSomething(); //-- effectively C.doAnotherThing(c) is an "alternative syntax" for c.doSomething()

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • What is the Use of Imported Archives in Mapping Objects

    Hi All,
    What is the Use of Imported Archives in Mapping Objects ( IR )
    Regards
    Vamsi

    Hi Vamsi,
    When we are doing JAVA , XSLT mappings we have to do import archievs
    after developing the JAva mapping in NWDS and create jar file come back to IR under imported archieves we will import the jar file.
    Similarly XSLT als make the zip and import under imported archieves
    Also when we have any java packages ,import it under archieves and make them to use in UDF
    See the below links
    XSLT Mapping
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fxi%2fxi-design_configuration%2ffileValidationsinSAPXI-ACaseStudy.pdf
    Check this thread...
    Reusability of User-defined Functions
    Check this thread...
    Re: User-defined function in multiple Message Mappings
    Using external JARs in Web Dynpro Dev.Component
    see sap documentation:
    http://help.sap.com/saphelp_nw04s/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
    Cheers...
    Vasu
    <b>** REward POints if found useful **</b>

  • What is the use of services for object icon (attachment) in customer master

    Hello,
    What is the use of the icon in customer master i.e. service for object(attchment)
    Any idea In which table those attachemnts stores,
    In SAP i can see only temp. structure table SGOS_ATTA when i look for table information, so i dont know where to look for these files although i tried great selection of tables which either were empty
    Thnks,
    Ahamad S

    Please search the forum or Google with the same text so that you will find many times this has been discussed.  Please go through the forum rules which you can see to your right screen and adhere to that.  Being an old member, no need to stress this.
    G. Lakshmipathi

  • What is the use of setting null values to Objects?

    What is the use of setting null values to Objects?
    regards,
    namanc

    It's more of a safety trap within java to handle the "programmers are still humans" exception.
    String myname;
    // print what???? Forgot to initialize the name!
    System.out.println(myname);Java will complain about myname not being initialized. It won't when you do this:
    String myname = null;
    // allright, your name is null
    System.out.println(myname);In the second case you are showing to java that you know what you are doing.

  • What is the use of an access object in a BOL hierarchy ????

    Hi All,
         I want to know what is the use of an access object in BOL hierarchy .... if we can use a search object to search for entities ... then in what scenario will an access object be used ?
    Regards,
    Ashish

    Hi Dominik,
            Thanks for the repy !!!!
    Now, as you said we can access a (deep) node of the whole model using an access object.
    Let us consider the component set ONEORDER. As seen we can use the following path to reach BTDocFlowAll using search object :-
    BTQuery1O -> BTOrder  -> BTOrderHeader  -> BTHeaderDocFlowSet -> BTDocFlowSet -> BTDocFlowAll ....
    Also, to reach BTDocFlowAll we can even use the access object as follows :-
    BTAdminI -> BTItemDocFlowSet  -> BTDocFlowAll....
    Now my question is :-
    Normally we use the class cl_crm_bol_query_service to fire a search based on a search object. Can we use the same class to fire a search based on access object ?
    (actually I currently dont have a CRM system so I could not try it out myself).
    If not, then how do we fire a query using an access object ?
    Regards,
    Ashish

  • What is the use of various text objects in text determination

    Dear All,
    What is the use of various text objects in text determination.e.g the sale document header object(In this what we define and where that text is copied further) and
    other text objects i.e customer/accounting,billing header etc.
    Regards,
    Ashima

    Hi,
    To exchange information between the User and the System    as well as between the objects (Ex: Customer to Sales document, Sales document to Delivery Document) SAP uses Text Determination to determine or to propose Text. Text can be determined for objects like customer master, all documents, condition records, customer material info records, etc...
    hope it helps..
    regards..
    yogi..

  • What is the use Business objects over WAD.

    Hi Folks,
    what is the use Business objects over WAD.
    How sap bw is going to use Business Objects.
    Thanks,
    Cheta.

    hi,
    A business object is a master record within the Measurement System, and is defined as part of the measurement class within Customizing.
    Examples of business objects are wells, well completions, and measurement points.
    Once the measurement object is maintained, it is saved with the business object so that when viewed, the measurement object is part of the business object.
    regards,
    Siddharth.

  • What is the use of end routine in bi 7.0

    hi friends,
    what is the use of end routine in bi 7.0. what scenerio we use end routine.
    Thanking u
    suneel.

    hi Suneel,
    check
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/frameset.htm
    End Routine
    An end routine is a routine with a table in the target structure format as input and output parameters. You can use an end routine to postprocess data after transformation on a package-by-package basis. For example, you can delete records that are not to be updated, or perform data checks.
    If the target of the transformation is a DataStore object, key figures are updated by default with the aggregation behavior Overwrite (MOVE). You have to use a dummy rule to override this.
    hope this helps.

  • What is the use of delta in BW side when we have delta in R/3

    Hi,
    what is the use of delta in BW side when we are already using delta in R/3 side?
    Like,
    Generic extraction:-
    with different delta extractions (Time stamp, Calendar day, Numeric pointer).
    Lo-Cockpit extraction with change log method.
    Co/Pa extraction with time stamp method.
    So from this delta activation first time full data will be loaded and after that only changed data will be loaded because of these deltas in R/3 side.
    So now my question is what is the exact use of delta in BW side with ODS/DSO because data already reached to BW with delta activation right.
    Can you please explain me what is the exact use of BW delta?
    Thanks in advance.
    Points to be added.
    Regards,
    Shyam.

    The purpose of Delta Queue is same in R/3 and BW.
    In BW, Delta Queue is used to capture changes made to objects within BW. (for Eg: BW Statastics)or Update data from one BW system to another BW system (if you have multiple BW systems).
    Message was edited by:
            Praveen Vujjini

  • What is the use of version attribute in jnlp tag??

    Hello,
    I want to know what is the use of version attribute in jnlp tag.
    For ex:
    <jnlp spec="6.0+" codebase="$$codebase" href="$$name" version="1.1">
    </jnlp>
    In the spec it explains:
    In the Jnlp tag:
    version = The version of the application being launched, as well as the version of the JNLP file itself.
    1. Is this version attribute would work as version attribute in jar tag. Ex: <jar href="application.jar" version="1.1"/> ?
    i.e. can we specify different jnlp's with the same name as we do for jar's with the help of version.xml.
    Any help is greatly appreciated.
    //Anjali

    Hi Reddy,
    If one Info Object depends on another info object we will make that dependent info object as a compounding attribute of main Info object.
    Eg: Storage Location – Plant
    In above eg there is no meaning of Storage Location without Plant. So, we will make storage location as compounding attribute of Plant.
    Regards,
    Sreehari.

  • What is the use of custom service in doe?

    Dear Experts,
    what is custom service & what is the use of that. any one would you please explain?
    Thanks & Regards
    Ashok Reddy Jalapu

    Hi Asok,
    Custom Services are services which are implemented by application developer or consultant during design time and plugged into SAP standard software to perform specific task.
    These services are based on the customer requirements and is included into the flow blue print (standard flow defination of a data object).
    For eg : While performing Delta-download, you need to archive some data in DOE based on their business requirements.
    Regards,
    Anil

  • What is the use of Generic class in java

    hi everyone,
    i want to know that
    what is the use of Generic class in java ?
    regards,
    dhruvang

    Simplistically...
    A method is a block of code that makes some Objects in the block of code abstract (those abstract Objects are the parameters of the method). This allows us to reuse the method passing in different Objects (arguments) each time.
    In a similar way, Generics allows us to take a Class and make some of the types in the class abstract. (These types are the type parameters of the class). This allows us to reuse the class, passing in different types each time we use it.
    We write type parameters (when we declare) and type arguments (when we use) inside < >.
    For example the List class has a Type Parameter which makes the type of the things in the list become abstract.
    A List<String> is a list of Strings, it has a method "void add(String)" and a method "String get(int)".
    A List<File> is a list of Files, it has a method "void add(File)" and a method "File get(int)".
    List is just one class (interface actually but don't worry about that), but we can specify different type arguments which means the methods use this abstract type rather than a fixed concrete type in their declarations.
    Why?
    You spend a little more effort describing your types (List<String> instead of just List), and as a benefit, you, and anyone else who reads your code, and the compiler (which also reads your code) know more accurately the types of things. Because more detail is known, the compiler is able to tell you when you screw up (as opposed to finding out at runtime). And people understand your code better.
    Once you get used to them, its a bit like the difference between black and white TV, and colour TV. When you see code that doesn't specify the type parameters, you just get the feeling that you are missing out on something. When I see an API with List as a return type or argument type, I think "List of what?". When I see List<String>, I know much more about that parameter or return type.
    Bruce

Maybe you are looking for

  • How hard would it be to upgrade the intel 997 processor in my S300

    Just wondering whether it could be done and if so howI would go about doing this..

  • Call a procedure through a DB LINK ???

    Hey, I would like to execute a distant procedure in a process. I have an HTML DB database with the "HTML DB application". I have a second db with my "data". With my "data" database I have a procedure, that I would like to execute in my HTMLDB databas

  • Iphone 3GS no longer recognized

    I have an iPhone 3GS running version 3.1.3. I have been synching (successfully) to my iMac running 10.4.11. Last synched on Nov 22, 2010. My current version of iTunes is 9.0.2. Now when I hook up the phone to my computer I get..nothing. No messages t

  • How to not display time in adf Calendar events?

    Hello everyone, I am using JDeveloper Studio Edition Version 11.1.2.3.0 I created a calendar component in my application based on a table that fulfills the variables needed by the calendar (Start date, end date etc). The events in the calendar are al

  • Oracle Enterprise Manager can't connect to database after installation

    Hello, I have a problem with Enterprise Manager. I installed Oracle 10g and the patch 10.2.0.2. After install, I could connect to database from SqlPlus without problems, but when I try to connect from AllPrograms - Oracle - DatabaseControl or since t