What are Wrapper classes and what are they used for ?

What are Wrappter classes and what are they used for ?..Also, any examples would be great to understand this concept

Wrapper classes are used to enclose primitive data
types so that they can be used in instances where an
object is required. For example, if you want to add an
integer to an ArrayList, you can't use this:java.util.List al = new ArrayList();
int i=123;
al.add(i);because the ArrayList expects data of type object. In
order to all the integer to the ArrayList, you must wrap
it in the Integer wrapper class. This works:java.util.List al = new ArrayList();
int i=123;
al.add(new Integer(i));Hope that helps.
Mark

Similar Messages

  • What Driver name/class and url are to be provided?

    I have created a new alias for jdbc in the portal along with the user-mapping...........as a result i can see jdbc system in the system drop-down box.............but i m having some problem while making the connection with portal as it is asking for driver name/class and url and also other details..........my back-end server is MS SQL...........What Driver name/class and url are to be provided in this case or any other details required?????
    thank you very much............

    Hi Deep,
    There is a how-to posted on SDN regarding how to connect and configure the BI JDBC Connector.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424
    This document describes the jdbc driver to use etc.
    Hope this helps,
    Cheers,
    Scott

  • What is inner class ,and how can I use it?thanks

    what is inner class ,and how can I use it?thanks

    Theres a whole chapter here http://developer.java.sun.com/developer/Books/certification/certbook.html (thanks to SSvetlana for pointing this one out).
    Col

  • What is the AlwaysFilter and when it is used for?

    What is the AlwaysFilter and when it is used for?
    Could you explain it in the details.
    Thank you

    jetq wrote:
    Sorry.
    cache.aggregate(AlwaysFilter.INSTANCE, new LongMin("getAge"))
    That doesn't really help.
    Where does AlwaysFilter come from? Is it part of the core API, or a 3rd party library? If the latter, which one? And in what do the API docs for this class not answer your question?

  • What are the algorithem and container to be used for this problem?

    Say I have a class with the following properties:
    groupMonth //String (jan,feb,mar�)
    accumulatedLasyYear //double
    accumulatedThisYear //double
    What will be the best container/algorithm to use for objects from the class above so I can have them sorted by month (I know it�s a string) AND GROUP the months together (and the accumulated as well)
    Example:
    Jan 4 8
    Feb 2 3
    Mar 5 2
    Jan 3 5
    Feb 4 2
    Mar 9 3
    The output should be:
    Jan 7 13 //(4+3, 8+5)
    Feb 6 5
    Mar 14 5
    Thanks for any thought�

    I'd suggest a java.util.Map<String, Set<WhateverClassYouveDefined>>. The keys are the year, the values are Sets containing all objects of that year. Iterate through your list of objects and group them into the right set using the map.
    Then I'd suggest looping through the keys to get each month's worth. Since you know what all the keys will be in advance, and there's only twelve of them, create an array of the twelve month strings. Loop through that array, and for each value grab the corresponding Set from the map.
    Then for each set you get, iterate through its contents, get the values, and add them.
    Then just print the month and the sums of values from the set, and go on to the next month.

  • Making a small change to an old project - How do I know what versions of Drivers and RIO etc was used for the last good build?

    If I want to make a small change to a legacy project of years ago, I want to limit my risk by using the exact same versions of LabVIEW, NI-RIO etc.  So I check out the project from the repo, but I don't know how to check what versions were used when the last know good build was made.  I don't want to introduce issues by mass-recompiling to the latest version.
    What is best practice in this case?  I could, before every repo commit, take a screenshot of MAX's software tree and save this in the project folder.
    Any ideas?  
    Solved!
    Go to Solution.

    The report is a great idea!  I store both a max technical report and a project.NCE (HW config export) with each of my projects for this exact reason.  Those files have sure come in handy!
    Also- its a good idea to make an image of the target as accepted and archive it somewhere.  ESPECIALLY for PXI based systems from NI.  (When the customer comes back for a "duplicate" just send the image with the PO and the system arrives fully configured)
    Jeff

  • What are exception class and persistant class?

    hi,
    what are exception class and persistant class?
    how are they different from the normal class?
    Regards,
    Anil

    Hii!
      Persistent Classes
    To use the Persistence Service for objects, the classes of these objects must be created as persistent classes in the Class Builder. The term persistent class does not imply that a class is persistent. (As a template for objects, every class is persistent). Rather, it means that the objects of that class and their state are managed by the Persistence Service. For example, the objects of these classes are instantiated in the ABAP program with a method of the Persistence Service, which ensures that the initialization is correct (not with the usual CREATE OBJECT statement). When the Class Builder creates a persistent class, it automatically generates an associated class, known as the class actor or class agent, whose methods manage the objects of persistent classes. As well as their identity, persistent classes can contain key attributes, which allow the Persistence Service to ensure that the content of each persistent object is unique.
      Check out this link
    http://www.sapnet.ru/abap_docu/ABENABAP_EXCEPTION_CLASSES.htm
    Regards
    Abhijeet

  • What are the frequencies all versions of the iPhone 6 and what are they used for (e.g. GSM, 3G, LTE, WIFI, Bluetooth,etc...) provided with channel numbers per frequency

    what are the frequencies all versions of the iPhone 6 and what are they used for (e.g. GSM, 3G, LTE, WIFI, Bluetooth,etc...) provided with channel numbers per frequency.

    Click here

  • What are Crypto Cards, and what are they different from Java Cards?

    Hi,
    I just heard the name 'Crypto Card'. I thought Java Card is the only standard for smart card. Could anyone tell me what are Crypto Cards, and what are they different from Java Cards? Thanks in advance.
    Joey

    Probably any card that offers cryptographic capabilities (crypto coprocessor) could be called "Crypo Card", but likely the term was referred to cards offering a pkcs#11 interface.
    Pkcs#11 is the standard for accessing crypto devices, like tokens, cards, or accelerators. Such a device can be easily accessed for example from your browser to perform cryptographic and digital signature operations.
    A Javacard can operate as a pkcs#11 device in you install on it an applet dealing with the pkcs#11 requests.

  • I do not receive all my e-mailson all my devices. I seem to get them all on my iPhone 5s, but not all show up on my iPad and iMac. they are all set up the same. Any Ideas on what is going on and what I can do to remedy this? thanks

    I have an iMac with OS X Lion 10.7.5,an iPhone 5s with iOS 7.1.2 and an iPad with iOS 7.1.2. all software is up to date. My problem is I do not receive all my e-mail on all 3 devices all the time. I seem to get them on my phone , but not all show up on my iMac or iPad. Any ideas as to what is going on and what can I do to resolve this issue? thanks

    On the iPhone, go into Settings -> Store and turn off "Automatic Downloads" for Apps (and Music and Books, if you wish). You can also do that on the iPad to prevent it from going in the opposite direction.
    That will stop any automatic downloading... to prevent them from coming over when using iTunes, select the phone (under Devices), Apps, and then uncheck "Automatically sync new apps." Again, do the same for the iPad if you wish.

  • Some BAPIs are auto commit and some are not.  what is the reason?

    Hi all,
    currently i am working on BAPI.I found that some BAPIs are auto commit and some are not. can anybody tell me what is the reason.

    hi,
    one option to find the difference is you have to look for parameters like test run or commit .
    If the function module  doesn't have them, then it means you have to use BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK based on the success or failure.

  • What ideal Win Server and Hardware are recommended for 11g DBs

    What best Win Server and Hardware are recommended for 11g DBs?
    - Processor
    - Memory
    - Storage
    - Network
    - Etc...
    Following is the scenario:
    - The server will be for development and test DBs
    - More than one databases will be installed each for each project
    - Maximum 4 databases will be accessed each time
    - Maximum DB size for each DB will be in couple of GBs.

    Which version of 11g ? For 11gR2, see the requirements here - http://download.oracle.com/docs/cd/E11882_01/install.112/e16773/reqs.htm#i1011417
    Any server that exceeds these requirement will suffice. Obviously the more the number of processors, the faster the processors, the more the RAM, the more the disk etc etc, the better.
    HTH
    Srini

  • I just download mountain lion to my mac,  now microsoft office suite doesn't work....it says 'you can't open the application 'microsoft word' because PowerPC applications are no longer supported.  What does this mean and what do I have to do to fix it??

    I just download mountain lion to my mac,  now microsoft office suite doesn't work....it says 'you can't open the application 'microsoft word' because PowerPC applications are no longer supported.  What does this mean and what do I have to do to fix it?? HELP!!

    Install Snow Leopard on another boot partition, or upgrade Microsoft Office to a newer version, or use any number of better alternatives. Some of them are free.
    Consider
    LibreOffice (donation-supported)
    NeoOffice ($10)
    OpenOffice (completely free)
    In addition to the above I also recommend Apple's Pages ($19.99). I use OpenOffice and Pages and have been completely Microsoft - free for over a year now. Life is better without Microsoft.

  • Hi what does this mean and what do I need to do?....You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms.

    Hi what does this mean and what do I need to do?....You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms.

    well not sure of what the problem is besides you running an operating system that adobe cannot work with. reply with that type info ie I am running windows xp home or OSX version 7.5.3 etc. Meanwhile here is the link for minimum system requirement for adobe's creative cloud products System requirements | Creative Cloud that should help. good day

  • What are muse templates and how do i use them?

    what are muse templates and how do i use them?

    thank you for the information. the reason i am asking is that i am having a problem with a website i am building in muse, specifically the functionality of my accordion menu. the accordion menu is on the left side of the page with a couple of elements directly beneath it. i would like the elements directly below the accordion menu to be pushed down when the menu is opened, however the menu is pushing everything on the page that is below down when it is opened. i have attached images to illustrate what i am talking about. is there any way that i can have the accordion menu push down just the elements directly below down and ignore all of the other elements on the page?

Maybe you are looking for

  • Problem with Purchase order (requisition)

    Hello friends, I have a problem during creating a PO also PO requisition. During my work, the system is reporting this error message: "Budget for all Years under year-based commitment update of value type Purchase order". I thing the problem is cause

  • Struggling with enrollment for apple IDs for students under 13

    I'm with a UK secondary school and we're hoping to be eligible to enroll in the 'Apple ID for Students' deployment program. We currently are enrolled with the 'volume purchasing' deployment program. I've visited: deploy.apple.com however there is no

  • Creating a Coldfusion Data Source that connects to a DB on a different server

    Your assistance is appreciated.  I am attempting to create a data source on server #1 that is to connect to a database residing on Server #2.  Thus far, each attempt made results in an error that the database "is already opened exclusively by another

  • Error in Info Package running.

    Hello Experts, When I am running a info package of data source 0Employee_Attr , request becomes red after some time and it gives a message at monitor screen on detail tab that: "Error occurred in the data selection" . How could I resolve it. with reg

  • Is there a CS4 Trial still

    well just after i installed the Adobe CS5 Master Collection, i cannot install both Adobe Premeire Pro CS5 or After Effects CS5 (because it requires a 64-bit opperating system). But i need After Effects & Premeire Pro CS4, but i can't find the trial o