Design Issue,Please reply

Hi,
If i want to define a HashMap,i can do it either as
a) HashMap map = new HashMap() or
b) Map map = new HashMap()
From design perspective which is better one and why ?
Thanks
vasubabu

When declaring references as superclasses or interfaces (such as List or Map or whatever), you can change the implementation without braking existing code. I.e. what was previously an ArrayList can be made a LinkedList and you only need to use 1 place in code. If you're not using a superclass reference, you need to change the code in more places.
It's not always necessary to declare the reference as a superclass one, but when the program might be changed later on and it's not absolutely certain that an ArrayList (for example) will be used, it's better to use List (or Map) as the reference.
Also Joey, your explanation sucked. There is no advantage in using a HashMap reference in place of a Map reference, apart from seeing the exact type in the places it's used.

Similar Messages

  • Sql loader issue ; please reply

    Hi All
    I added 2 extra columns to an existing table .
    table tab (ATTD_IND,
    ATTD_ID,
    SEQ_NO,
    CREATE_DATE "to_char(sysdate,'yyyymmdd')",
    CYCLE_DT_CD "to_char(sysdate,'yyyymmdd')",
    CMEH_ID,
    ATTENDEE_TYPE,
    This table is populated using loader. The issue is the file which we get is having data till seq_no .So the ctl. file works as create date and cycle dt are the last columns values defaulted to sysdate. We dont get them in the file. Now the file would have 2 new columns after seq_no , which are cmeh id and attendee type.
    the issue is how to load these using the ctl file. I cant change the table and make create date and cycle date as the last columns. FILLER does not work here as I am not skipping any columns in the data file.
    Please respond and guide me
    thanks

    user444699 wrote:
    Hi All
    I added 2 extra columns to an existing table .
    table tab (ATTD_IND,
    ATTD_ID,
    SEQ_NO,
    CREATE_DATE "to_char(sysdate,'yyyymmdd')",
    CYCLE_DT_CD "to_char(sysdate,'yyyymmdd')",
    CMEH_ID,
    ATTENDEE_TYPE,
    This table is populated using loader. The issue is the file which we get is having data till seq_no .So the ctl. file works as create date and cycle dt are the last columns values defaulted to sysdate. We dont get them in the file. Now the file would have 2 new columns after seq_no , which are cmeh id and attendee type.
    the issue is how to load these using the ctl file. I cant change the table and make create date and cycle date as the last columns. FILLER does not work here as I am not skipping any columns in the data file.
    Please respond and guide me
    thanksEXTERNAL TABLE & custom PL/SQL perhaps?

  • A tomcat issue please reply

    Hi,
    Once the tomcat is started using the batch file, I get information flashing in the dos console.Then I go to the browser and type in http://localhost:8080, I donot get the index.jsp page but instead I get the directory listing in the ROOT directory.
    I have not made any changes to the default web.xml or the server.xml file.Let me know what could be the problem i.e., why am I not getting the index.jsp page.Help greatly appreciated.
    AS

    Once the tomcat is started using the batch file, I get
    information flashing in the dos console.I don't know what this means. Perhaps if you start the batch file by typing the command into a shell rather than double clicking the icon you can see any messages that come up.
    Save that, I'd look in the logs to see what's happening there.
    Can't tell based on the little you've posted.

  • My site on mozilla firefox is having many problems ,can not blog,cannot reply to messages, the screen is alot smaller and other issues, please respond.

    My site on Mozilla Firefox is having many problems, can not blog, can not reply to messages in inbox , the page is a lot smaller and other problems. Please reply. Thank you

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • SOA Design issues and other politics

    Hi all,
    I have a requirement for live data feed from external system. I am using SOA11g and JDeveloper 11g. There are two designs, one proposed and other I have in mind to achieve this.
    1) The external system sends XML data in a push model to the exposed SOA Web Service (uses one-way messaging mode) at my end. I then store the message in the database
    a) In this design how do we keep track of all messages that are sent are received. Is there a better solution.
    2) The third party is proposing a Web Service at their end. The application being real-time (i.e any changes at their DB end i.e some DB tables, should be propogated across to our web services using XML messages). I will have to keep sending XML requests on a regular basis (say every 5 seconds). Can I achieve such type of Web Service client using SOA 11g?
    a) Here I have a design issue, that the data feed is live, why do the WS client have to keep sending requests at regular intervals. Why can't the third party send data whenever there is an update/insert at their database end. Third party is coming up with advantages like loose coupling and making the Web Service more generic. I doubt all the claims give that the applications are B2B and we are the other ones who will be using their web services for the time being. Their may be other two organizations later on.
    b) If the first request is not yet returned, will the second request after 5 seconds be blocked.
    This designs and solutions are becoming quite political across organizations, and got to do with who will take the blame for data issues. I just want a proper SOA design for live data feed. Please suggest the advantages and disadvantages of both if anybody has been through this path.
    Thanks
    Edited by: user5108636 on 1/09/2010 18:19

    See if wireless isolation is enabled.
    When logged into your WRT1900AC using local access replace the end of the browser URL with:
    /dynamic/advanced-wireless.html
    Please remember to Kudo those that help you.
    Linksys
    Communities Technical Support

  • Why iPhone display border is black then light green then pink. Please  reply me i saw this in many iPhones.

    why iPhone display border is black then light green then pink. Please  reply me i saw this in many iPhones.

    Hello, Greg et al:
    I figured out the problem and got the project working (sort of): the app did not like 'resetKeywordList()' in 'localeList_changeHandler', so I set the keywordList in the two 'getKWs_[locale]ResultHandlers' directly (result of the calls to my CFC).
    That fixed the issue, but not completely: if I change language while the KeywordSelect ComboBox (on the right) selected item is not 'ALL' the cartoon AC does not refresh correctly. For now, I am getting around this by disabling the language change ComboBox (on the left) when anything other than ALL is selected. This is not so bad, until I figure out what the problem is.
    If anyone wants to look, you can access the Main page of the app from here, http://www.timos.com/timos/green/greenPlanet.cfm, by pressing the CounterThink logo at the bottom. The new page, not linked to from my site yet, is   http://www.timos.com/timos/green/ct/CounterThinkNEW.cfm (just insert NEW before the .cfm extension).
    I know my code could be a lot better and intend to keep working on it, so I would love and really appreciate comments/suggestions that anyone wants to provide.
    Regards and ciao for now.
    Carlos

  • Java (JMX) vs WLST (Please Reply.. Its Urgent!)

    HI,
    I know that there are two ways to admin weblogic server. One way is by WLST scripts which we write in WLST console. Second way is by JMX which we write in JAVA language.
    I know that java language gives more flexibility but still all the scripts present in my companies Weblogic servers are WLST scripts.
    Can anyone tell me about all the benefits and advantages I can have if I change them to Java (JMX) code.
    One of the Flexibility is that I can implement multithreading and start multiple AdminServer (in multiple domain) at same time.
    Thanks
    Nitish Kumar

    Doublepost: http://forum.java.sun.com/thread.jspa?threadID=5192841
    Crosspost: http://forum.java.sun.com/thread.jspa?threadID=5192927
    Like I said in your former topic: just debug it. Run the debugger or put some simple System.out.println() lines to check if the array has a length, if the array elements are not null, if the final SQL statement is correct, etcetera.
    By the way, with putting pressure by shouting "please reply its urgent" you don't gain that much respect from our side. Some will refuse to reply. Urgency is your issue, not ours.

  • BAPI   please reply immediate

    Hi friends
    I was given some screen shots regarding a bank like first to keen paprt no
    then we will ge list of cif no , name and pspt number , then to create a new acct,----,add new customer... like this nearly 13 screen shots printout.. hey gave and asked to find the bapi used to map the particular screen shots....please reply me immediately....
    thanking u

    Hai friend
    yes... its CIF he also said the same .... He asked me to look the BAPI for CIF SEARCHA and CIF CREATION....
    please give ur mail id i will forward the scanned screen shots given by them... please help... Iam very New to BAPI.. so iam worrying a lot.....Please reply me immediateeee.......
    The screen shots naes are-----
    1)CIF search Cust by Name I/C
    2)CIF SEARCH CUST BY NAME I/C
    3)CIF ADD NEW CUSTOMER
    4)SA OPEN NEW A/C
    5) CUSTOMER RELATIONS IPS & MESSAGE ID
    6)SA OPEN NEW A/C
    7)SA OPEN NEW A/C
    8)SA INITIALISE PASSBOOK
    9)SA DEPOSIT
    10)GIA PLACEMENT
    11)PRINT DULICATE GIA
    12)SA CLOSE ACCOUNT
    13)ISSUE FOREIGN FUND TRF
    14)ISSUE SWIFT FUND TRF
    15)COLLECTION INTER BANK GIRO
    ThankYou

  • Adobe website says "We are currently experiencing some issues, please try again later."

    Hi!
    Whenever I visit the download page for any product, like https://creative.adobe.com/products/download/muse or https://creative.adobe.com/products/download/photoshop, the site says: We are currently experiencing some issues, please try again later. If the problem persists, contact customer support. What should I do about this or is there anything I can do?

    Please read, and reply back here with information https://forums.adobe.com/thread/1499014
    -try some steps such as changing browsers and turning off your firewall
    -also flush your browser cache so you are starting with a fresh browser
    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip/
    http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Please reply its urgent

    it is only wokring when i only assign value to sub1 variableassign
    <html>
    <body>
    <%@ page language="java" import="java.sql.*" %>
    <%
    String[] list=request.getParameterValues("list");
    // String list=request.getParameter("list");
    int i;
    String sub1;
    for(i=0;i<list.length;i++)
    try
    sub1=list;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:dsn1","","");
    Statement stmt=con.createStatement();
    stmt.execute("delete from mes where sub='"+sub1+"'");
    out.println(sub1);
    stmt.close();
    con.close();
    catch(Exception e)
    {out.println(e);}
    %>
    Click here
    </body>
    </html>

    Doublepost: http://forum.java.sun.com/thread.jspa?threadID=5192841
    Crosspost: http://forum.java.sun.com/thread.jspa?threadID=5192927
    Like I said in your former topic: just debug it. Run the debugger or put some simple System.out.println() lines to check if the array has a length, if the array elements are not null, if the final SQL statement is correct, etcetera.
    By the way, with putting pressure by shouting "please reply its urgent" you don't gain that much respect from our side. Some will refuse to reply. Urgency is your issue, not ours.

  • Is in dv6 6155tx Screen backside HP LOGO blinks or light up or not.please reply

    please reply me that hpdv6-6155tx model's back screen HP LOGO blinksor not.in mine it is not blinking s i m worried please reply

    Hi Jaco, 
    Ive downloaded Nvidia 32 bit version and as soon as my comp came back on i could see the changes straight away
    Getting the wide screen look off my comp was my main issue and that you have done  
    Thank you so much for taking the time to help me. Your a star!  
    Really appericate it  
    Eric and Caz

  • Anyone else having trouble downloading applications? keep getting this messageWe are currently experiencing some issues, please try again later. If the problem persists, contact customer support.?

    Is anybody else having trouble accessing the part of the site in which you download creative cloud?
    "We are currently experiencing some issues, please try again later. If the problem persists, contact customer support."

    Please read, and reply back here with information https://forums.adobe.com/thread/1499014
    -and try some steps such as changing browsers and turning off your firewall for downloads
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Please reply if you are experiencing Droid DNA SIM card errors

    Please reply if you have a Droid DNA and are experiencing SIM card errors.
    1) Have had it more once every couple of months.
    2) Occurs more than once per week.
    3) More than once a day.
    If you aren't experiencing SIM card issues, can you reply to the other thread?
    Thanks!

    No sim-card issues here also...! I feel sorry for people who have to deal with this "Known" problem on a daily basis. I'm almost certain owners of the DNA are feed up with the run-around tactics Verizon and HTC are implementing. NOBODY wants to take ownership of this problem and in doing so would cost Verizon and/or HTC millions..!     So ------ what do they do in the meantime - they play the blame-game ---- pointing fingers and saying, "It's not me - it's you or in this case it's a software problem --- no it's a hardware problem"...!  At this point --- WHO CARES --- I just want a resolution once and for all...!  No --- I don't want a third sim-card to try (going on fourth---actually I've lost count), No --- I don't want to take-out the sim-card and clean it then reseat, and above all else No --- I don't want a refurbished phone when my "Brand-New" one is 2 months old..!  
    implementing
    implementing

  • Battery with X and an "alleged" spill issue - Please help

    Hi Everyone, This is my first post here. I had an X on my battery (which seems to be a common issue) and I tried everything in the forums and it did not work. Later, I called apple support and they sent me a new battery. This did not solve the problem either. So, I sent the mac in for repairs and they told me that the logic board has corrosion due to liquid spill, and apple care would not cover it. The sad part is that I can vouch for the fact that there was no liquid on or around my laptop, since I use it for my research and no one can borrow it because of the restricted material (graduate school requirements). Please help, and let me know if there is any way out of this. Is there anything other than spillage that can cause this corrosion on the logic board?
    PS: The logic board had to be changed within two months of buying it, when the display stopped working, and so this is the third logic board within a year (pretty exciting life for a little mac book!).

    Thanks for the reply micheal, but is'nt it unfair that they think it is my fault, when my macbook went bad in a couple of months? I am sure it would be very difficult for me to prove that I am not at fault, but even they cannot prove their innocence (remember that the product has been opened by them and not me!). I feel like smashing the same laptop that I liked so much and buying something else, just to get over this. If any one has any experience with such issues, please let me know a sensible way of handling it. It is my word against theirs and I am losing sleep and possibly $1400 or so...any help is appreciated.

  • Design issue with the multiprovider

    Design issue with the multiprovider :
    I have the following problem when using my multiprovider.
    The data flow is like this. I have the info-objects IobjectA, IobjectB, IobjectCin my Cube.(Source for this data is s-systemA)
    And from another s-system I am also loading the masterdata for IobjectA
    Now I have created the multiprovider based on the cube and IobjectA.
    However, surprisingly join in not workign in multiprovider correctly.
    Scenario :
    Record from the Cube.
    IObjectA= 1AAA
    IObjectB = 2BBB
    IObjectC = 3CCC
    Records from IobjectA =1AAA.
    I expect the record should be like this :
    IObjectA : IObjectB: IObjectC
    1AAA       :2BBB       :3CCC
    However, I am getting the record like this:
    IObjectA : IObjectB: IObjectC
    1AAA       :2BBB       :3CCC
    1AAA         : #             :#
    In the Identification section I have selected both the entries for IobjectA still I am getting this error.
    My BW Version is 3.0B and the SP is 31.
    Thanks in advance for your suggestion.

    May be I was not clear enough in my first explanation, Let me try again to explain my scenario:
    My Expectation from Multi Provider is :
    IObjectA
    1AAA
    (From InfoObject)
    Union
    IObjectA     IObjectB     IObjectC
    1AAA     2BBB     3CCC
    (From Cube)
    The record in the multiprovider should be :
    IObjectA     IObjectB     IObjectC
    1AAA     2BBB     3CCC
    Because, this is what the Union says .. and the Definition of the multiprovider also says the same thing :
    http://help.sap.com/saphelp_bw30b/helpdata/EN/ad/6b023b6069d22ee10000000a11402f/frameset.htm
    Do you still think this is how the behaviour of the multiprovider.. if that is the case what would be the purpose of having an infoobject in the multiprovider.
    Thank you very much in advance for your responses.
    Best Regards.,
    Praveen.

Maybe you are looking for

  • My Ipod Touch is dead, wont turn on or connect to itunes HELP!

    Iv had my Ipod touch 4h gen for quite along time one day i left it at a friends but it had run out of battery so i put it on charge and left it for a while i came back to it later and still nothing all it comes up with is the battery sign with the li

  • Null Pointer Exception after adding Transient attribute in View Object

    Hello Experts I am using Jdev 11.1.2.3. I have added a transient attribute in view object and set default value to another view object attribute via view accessor of view link between view objects. the value of expression is ItemMasterRO.Description,

  • JDev with Sun App Server Install

    I'm just starting with EJB and am trying to compile a Remote interface and am getting the following compile error: Error(5,48): cannot access class javax.ejb.EJBObject; file javax\ejb\EJBObject.class not found I added the CLASSPATH for j2ee.jar to Wi

  • Bootstrap menu in BC(3rd level dropdowns)

    Hi everyone, I am making a module V2 bootstrap nav menu in BC but i cant get the 3rd level dropdown ITEM_1_1  and Items Item2_1_ and item  ItEM2_1_1 to open, Here's the code of the file children.html for  this. <li class="dropdown"{tag_menuitemidname

  • Script for batch delet redundant layer

    I have thousands files in the different folders, each file has same layer named "Job Info". Can someone help me to write a script for del this layer folder by folder? I expected the script tells me that I have to select a folder, then it can automati