What is the advantage of using Wrapper Classes ?

Hi friends,
I am happy to join Java/J2EE tech. My project is scaled over the network. MVC-II struts, EJB based architecture, we are using.
We are asked to use Wrapper Classes in in Java programs and not the primitive data types. I could not understand the reason.
Pls tell me what is the advantage of using Wrapper Classes over the primitive data types ?
means Integer instead of int, etc....

Hi friends,
I am happy to join Java/J2EE tech. My project is
scaled over the network. MVC-II struts, EJB based
architecture, we are using.
We are asked to use Wrapper Classes in in Java
programs and not the primitive data types. I could
not understand the reason.
Pls tell me what is the advantage of using Wrapper
Classes over the primitive data types ?
means Integer instead of int, etc....I am not sure why use Integer over int; but Wrapper classes are used to remove coupling between classes and create one hand doesn't know what the other hand does effect.
for example:
when you have a SFTP java package but doesn't do everything that your application needs to do in one step and you need to do sftp stuff at many places in your application, it would be wise not to use SFTP java package directly from all the classes that need to do sftp stuff. Because if you were to change the SFTP package later due to say some bug fix or newer version or ... you would have to go and modify all the classes that had sftp stuff to update.
Instead you could write a custom sftp wrapper that handles all the sftp stuff for your application needs and that wrapper deals with the SFTP java package. So all the classes don't need to know which SFTP java package is being used only the custom-wrapper needs to know.

Similar Messages

  • What is the advantages of using Interface?

    Hi,
    I still don't get what's the advantages of using interface. Reusability? is it the main advantage? thanks in advance.

    What is GOF?
    Interface is a good program practice when working with RMI (Remote Method Invocation) application. Imagine your anti-virus. When you connect to internet your software invoke a method into your software vendor site and download the new definitions. Now every anti-virus Subscription is different. The method you invoke, will depends on your Subscription. If you hard code the method abstractly, you will not achieve this functionality.
    Another concept is that because Java does not practice multile inheritance interface is a goog way to interface into another class.
    Example
    I want to extends to multiple class which java do not support. I will write an interface i.e I want to extends to FileOutputStream, OutputStream, Object, Integer, String, ActionEvent, Window etc.
    I will write an interface like this
    interface MyClass {
    pulic void setFileOutputStream ( FileOutputStream file );
    public void setOutputStream ( OutputStream );
    public Object getObject ( );
    public Seriable getInterget ( )
    ------------------- //You get the gist
    With this interface you can implement they behaviours
    You could say, why don't we just import them. When yo import them you have already hard coded there behaviour. But this way you can apply diferent behaviour throughout you application development. And any class that implement them must provide ways of using it.

  • What is the advantage of using methods to return objects?

    Hello there,
    What is the advantage of using static methods to return
    objects? Isnt this a Factory Pattern ?
    What is the real advantage of using methods to return objects
    rather than using public constructors to create objects ?
    Can some one please explain
    Regards

    I think there were two questions. The first (why
    static) is well answered but I hope somebody can
    answer the general question - why whatever =
    createSomething(); as opposed to whatever
    = new Something(); - because inquiring minds
    want to know.I thought I answered that question. Perhaps I need to be more specific.
    For the Singleton pattern, you don't want a new instance (except possibly the first time, if you're using lazy instantiation).
    For the Factory pattern, you might not always want an instance of the actual class containing the static methods, so new won't work.
    If, on the other hand, neither of the above holds, there is no reason not to use new (unless, of course, anyone can come up with another use of static creators).
    RObin

  • What are the advantage of using a passive monitoring technique ?

    What are the advantage of using a passive monitoring technique

    Hi Plawansai,
    I saw your question that is still unanswered.
    I believe an advantage of using a passive monitoring technique is that it won't interfer with live traffic, as it does not inject traffic into the network or modify the traffic that is already on the network.
    One drawback anyway, is that post-processing time can take a large amount of time with passive monitoring!
    A combination of the two monitoring methods seems to be the route to go.
    V.

  • What is the advantages of using Flexconnect groups

    what is the advantages of using Flexconnect groups in WLC?
    Reg,
    Ezra.

    Pls refer this document for more detail about these features
    http://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/Mobility/emob73dg/emob73/ch7_HREA.html#wp1091114
    FlexConnect is one mode an AP can operate, typically deployed in Branch setup where you do not have a controller at branch site. Those AP can register to a controller at your HQ or main site. So traffic will terminate at your branch switch instead of tunnel back to HQ-WLC.
    If you want roaming within your branch FlexConnect AP then you have to put those AP into a FlexConnect Group. Then only key information shared among those AP to facilitate fast roaming.
    Pls do not forget to rate our responses if you find them useful.
    HTH
    Rasika

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • What are the advantage of using Oracle Database when compare to SQL SERVER

    Hi all
    Please tell anyone about
    what are the advantage of using Oracle Database when compare to SQL SERVER
    Thanks in advance
    Balamurugan S

    user12842738 wrote:
    Hi,
    There are various differences between the two.
    1. SQL Server is only Windows, but Oracle runs on almost all Platforms.
    2. You can have multiple databases in SQL Server, but Oracle provides you only one database per instance.Given that the very term 'database' has s different meaning in the two products, this "difference" is absolutely meaningless.
    3. SQL Server provides T-SQL for writing programs, whereas Oracle provides PL/SQLWhich means what? Both products have a procedural programming language. They named them differently, and the languages are not interchangeable. Means nothing in comparing the features/strengths/weaknesses/suitability to purpose.
    4. Backup types in both are the same. (Except Oracle provides an additional backup called Logical Backup.)You make that sound like "Logical Backup" is something more than it is. It is nothing more than an export of the data and metadata. Many experts don't even consider it a backup. I'm sure SQL Server provides the same functionality though they probably call it by some other name.
    5. Both provide High Availability.Well, I guess they both have a suite of features they refer to as "High Availability". But what does that really mean? The devil is in the details. Remember, the two products don't even agree on what constitutes a "database".
    6. Both come in various distributions.???
    >
    If you are going for an Implementation, you can try SQL Server Express Edition and Oracle XE which are free to use.
    Then you can choose whichever is comfortable for your needs.
    Thanks.

  • What is workflow ? What are the advantages of using workflow? What are the

    what is workflow ? What are the advantages of using workflow? What are the steps for building a workflow ?

    Hi Leela,
    Your question is very straight question.
    Better u can follow these links.
    http://www.esnips.com/doc/90b7763b-f9d9-4861-a273-04674b9fe3f2/Workflow
    http://www.esnips.com/doc/991843e0-8686-4949-94b9-f45d90081b22/workflow
    And i'll give some theory answer for ur questions
    i.e.,SAP Business Workflow can be used to define business processes that are not yet mapped in the R/3 System. These may be simple release or approval procedures, or more complex business processes such as creating a material master and the associated coordination of the departments involved. SAP Business Workflow is particularly suitable for situations in which work processes have to be run through repeatedly, or situations in which the business process requires the involvement of a large number of agents in a specific sequence.
    You can also use SAP Business Workflow to respond to errors and exceptions in other, existing business processes. You can start a workflow when predefined events occur, for example an event can be triggered if particular errors are found during an automatic check.
    SAP provides several workflows that map predefined business processes. These workflows do not require much implementation. For an overview of these SAP workflows, refer to Workflow Scenarios in Applications.
    Integration
    SAP Business Workflow uses the existing transactions and functions of the R/3 System and does not change the functions. You can combine the existing functions of the R/3 System to form new business processes with SAP Business Workflow. The workflow system takes over control of the business processes. If you are already using SAP Organizational Management, you can use the organizational structure created there to have the relevant agents carry out the individual activities. It is possible to have an activity carried out by a position. This ensures that the respective occupiers of the position can carry out the individual activities during execution of the workflow. This means that personnel changes in your organization are taken into account immediately in the execution of a workflow.
    Features
    SAP Business Workflow provides a number of tools for defining and analyzing workflows as well as for monitoring operation.
    The Workflow Builder is for displaying and making changes to workflows. You can make small extensions directly to the original workflows supplied by SAP, such as carrying out your own agent assignments or changing deadline monitoring.
    There are several Workflow Wizards to support you in the definition of workflows, with which you can create specific parts of a workflow. The Workflow Wizard Explorer gives you an overview of the existing Workflow Wizards.
    In order to make the functions of the R/3 Systems available to a workflow, you use business objects, which you can define and analyze in the Business Object Builder. These business objects are made available to the workflow in reusable tasks. The Business Wizard Explorer gives you an overview of all existing tasks.
    The end user receives information about the activities they are to carry out in their Business Workplace. This provides them with a central overview of all the activities that they are authorized to carry out. They can commence the activities from here.
    Several tools are available to the workflow system administrator, with which they can control and analyze the current workflows. The workflow system administrator is notified of problems automatically by the system.
    Workflow tutorials with step-by-step and with screenshots are available at http://www.****************/Tutorials/Workflow/Workflow.htm
    This has a step by step procedure :
    http://fuller.mit.edu/workflow/debugging.pdf
    www.erpgenie.com/sap/workflow/debugging.htm
    http://www.erpgenie.com/workflow/debugging.htm?2b5de440
    Rewards if it is useful.

  • What are the advantages of using an internal table with workarea

    Hi,
    can anyone tell me
    What are the advantages of using an internal table with workarea
    over an internal table with header line?
    thnks in adv
    regards
    nagi

    HI,
    Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    <b>Difference between Work Area and Header Line</b>
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table
    1) The difference between
    whih header line and with out heater line of internal table.
    ex:-
    a) Data : itab like mara occurs 0 with header line.
    b) Data: itab like mara occurs 0.
    -While adding or retrieving records to / from internal table we have to keep the record temporarily.
    -The area where this record is kept is called as work area for the internal table.
    -The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    -Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    a) Data : itab like mara occurs 0 with header line.
    table is with header line
    b) Data: itab like mara occurs 0.
    table is without header line
    2)work area / field string and internal table
    which one is prefarable for good performance any why ?
    -The header line is a field string with the same structure as a row of the body, but it can only hold a single row , whereas internal table can have more than one record.
    In short u can define a workarea of an internal table which means that area must have the same structure as that of internal table and can have one record only.
    Example code:
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    Regards,
    Padmam.

  • What are the advantages of using CACHE and NOCACHE Hint

    What are the advantages of using CACHE and NOCACHE Hint & difference of them.I saw one of oracle.sql script have CACHE & oracle rac script include NOCACHE .Why is that

    924250 wrote:
    In a SOA product include db scripts,when we install the product we want to execute the db script to create sequence both oracle RAC & Oracle db
    Oracle DB
    CREATE SEQUENCE REG_LOG_SEQUENCE START WITH 1 INCREMENT BY 1 NOCACHE
    Oracle RAC DB
    CREATE SEQUENCE REG_LOG_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDERas sb mentioned, this has nothing to do with oracle hints.
    you'll want to search the documentation about sequences.

  • What are the advantages of using LabVIEW projects in TestStand, as apposed to just a path to a vi

    What are the advantages of using LabVIEW projects in TestStand, as apposed to just a path to a vi ?
    I am modifying an existing workspace for a new product, and it seems like more work to add the vi's into a LabVIEW project
    does it gain anything in the long run

    Hi Rusty,
    I wanted to quickly clarify on the integration between TestStand and LabVIEW Projects.
    As Jeff mentioned, some of the big benefits of using LabVIEW Projects is to organize code and to namespace them.
    For instance if you had a project called "Power Supply" that housed all your power supply code and had a VI in that called "Initialize", and another project called "Temperature Chamber" that also had a VI called "Initialize", both these VIs are namespaced by the project, so there is no longer confusion about which "Initialize" VI is being used.
    Now from a TestStand point of view, in prior version of TestStand, we lost some of this benefit because TestStand did not know about TestStand projects and called VIs simply as un-namespaced VIs. However, in TestStand 2010 (released last year, free eval available at ni.com/teststand), we added the ability to (optionally) call VIs within the context of their projects. This means that:
    VIs are now namespaced by their project, even when called from TestStand
    VIs can use project specific constructs like NI-DAQmx tasks and conditional compilation settings
    Note: When creating deployments, the VIs maintain their projects and namespacing, so this benefit holds true for deployments as well.
    Additionally, someone had mentioned looking into using lvlibs to namespace your VIs for deployment. Two comments:
    With TestStand 2010, this is no longer neccessary since the project itself namespaces the VIs
    You might also want to look into LabVIEW Packed Project Libraries, which combined several VIs into a single file. Think of it as a DLL specific to LabVIEW that is as easy to call as normal LabVIEW VIs. TestStand 2010 can call VIs that are exposed by PPLs. In addition, the deployment utility can automatically pack your VIs into PPLs for deployment.
    Hope this is helpful!
    Jervin Justin
    NI TestStand Product Manager

  • What is the advantages of using oracle10g database?

    Hi,
    I didn't feel many advantages when using oracle10g.
    So what is the advantages of using oracle10g database?
    For common using,not for advance.It is not big different.
    Thanks in advance!

    For normal users versions before 10g is sufficent.But for large applications means distributed applications(grid) 10g is good one

  • What is the advantage of using RMI over socket connection

    plz tell me guys what is the advantage of using RMI over socket connection bcoz inherently RMI also uses socket connection.so what is the exact difference in between thm and what is the advantage of using RMI over socket connection.

    i knew tht bt i http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal — in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • What is the advantage of using Yosemite on my iMac over 10.9.5

    What is the advantage of using Yosemite over Lion on my iMac?  Is it any faster, slower or what?

    Before upgrading to a new operating system, here are a couple considerations:
    1.  If you are having problems with your current system, full version upgrades
         will make them worse.  Fix all issues before making the upgrade.
    2.  Make sure that any third party hardware is compatible with the new operating
         system, i.e. drivers available to support the OS.
    3.  The hidden cost item of needing to upgrade apps to work on the new OS.
         If your any of your favorite or mission critical applications are not compatible,
         expect the possibility of needing to purchase upgrades of those apps so that
         they will work on the new OS.
    4.  If you rely on your computer for your livelihood,  be absolutely sure that you
         have a backup strategy and plan to quickly recover should there be any issues.
         There has been many a complaint on this forum that new OS upgrades have
         have ruined their business and had no recovery strategy in place.  Besides,
         anyone relying on a computer for their livelihood is REQUIRED to have such
         a strategy in place regardless of OS upgrades as anything can happen at
         any time.
    5.  If everything is working fine and dandy for you currently, you need to ask if
         any of the new features of an OS of any use to you.  If not, then perhaps
         a "don't fix it if it ain't broke" philosophy is what you should follow.

  • What is the advantage of using mgcp instead of h323 gw?

    what is the advantage of using mgcp instead of h323 gw?
    i think mgcp supports srtp but h323 not

    Hi
    H.323
    -Uses Abstract Syntax Notation 1 (ASN.1) for call control messages
    -Uses a peer-to-peer model
    -Scales well in an enterprise
    -Fractional PRI support
    -CallerID support on analog FXO
    -Many more TDM interface types and signaling
    -Gateway-resident applications like TCL and VXML
    -CAC network design with H.323 Gatekeepers
    -No release dependencies between GWs and CCM
    -Call preservation for SRST on PRIs
    MGCP
    -Not as mature as H.323
    -Uses clear text for call control
    -Uses a client-server model
    -Ideally positioned for service providers (centrally located call agents)
    -Centralized management and control (Dial plan, etc.)
    -Enhanced call survivability
    -Better feature interaction with capabilities like CallerID
    -Support of QSIG supplementary services with CCM
    Thank you
    please rate all useful information

Maybe you are looking for