List v = new Vector() how can i write this ?

List v = new Vector() how can i write this ?
vector does not 'extends' List rather it 'implements' only ......so how can write this way ? ( polymorphism applies only for 'extends' ).

my question in a simple way is :
List some_list extends Vector
No, List is an interface; Vector is a concrete class. Read the javadocs.
Vector implements List
>
AND
List some_list implements Vector
are these two same in behaviour
our  apart from theoretical differences ?thanks
Interfaces don't have any implementation; they're pure method signatures. When a concrete class implements an interface, it makes a promise that says "I will provide implementations for exactly these methods. Any client can call a method from the interface and I will do something 'sensible' if I'm written correctly."
From the point of view of static and dynamic types, there's no difference between interfaces and classes.
C++ has interfaces, too - they're classes with all pure virtual methods. If you understand how C++ works, the concept shouldn't be hard.
ArrayList is preferred precisely because it isn't synchronized by default. (You can always make it so using java.util.Collections if you wish later on.) If you don't need synchronization, why pay the performance penalty?

Similar Messages

  • I have installed the font Broadway on my computer and it works in Microsoft Word but does not appear in the font list in InDesign.  How can I fix this problem?

    I have installed the font Broadway on my computer and it works in Microsoft Word but does not appear in the font list in InDesign.  How can I fix this problem?

    Start by rebooting the computer. If that doesn't work, search for adobefnt*.lst and delete all instances where * becomes a 2-digit number.

  • My featured apps tab in the app store is stuck on a app called flipboard, flipboard wont go away when i hit the featured tab to see new apps. how can i get this tio go away?

    my featured apps tab in the app store is stuck on a app called flipboard, flipboard wont go away when i hit the featured tab to see new apps. how can i get this to go away?

    I'm stuck with Phoster...

  • How can i write this C-Code in G-Code

    hallo
    how can I write this C-Code in LabVIew ,
    for a=0; a=<10; a++
       for b=0; b=5 ; b+2
            X= 3+b;
      Y=1+a;
    please see the attachment and tell me where is the problem
    Attachments:
    Unbenannt 11.vi ‏43 KB

    Well, at least you tried and got some of it right.
    I think this should do what you want, but my C is rusty. Is the increment performed before or after the loop executes? If it's after, then I believe the loop should iterate 11 times, not 10.
    In any case, you should note that for a literal translation, you would need to add a sequence structure to guarantee that Y was written to only after the inner loop finished because of the way data-flow works.. Also, note that controls and indicators in LabVIEW are not equivalent to variables. They can be used as such, but they usually should not be.
    Another point about this is that you probably want to use the correct data type - the orange terminals are floating point indicators (of double precision, in this case) and you want integers.
    To learn more about LabVIEW, I suggest you try looking at some of these tutorials.
    Try to take over the world!
    Attachments:
    C.png ‏4 KB

  • First i open google search page.after seeing the results if i click in any site the site appears in a new tab.how can i stop this?

    these days i face this problem.whenever i click on a site it appears in a new tab.how can i stop it?

    The Google Search setting has an option '''Where results open'''. If it is selected, you can try deselecting that. If it doesn't solve the problem, please check if this happens in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]. Safe mode disables the installed '''Extensions''', and themes ('''Appearance''') in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''. Hardware acceleration is also temporarily disabled - the manual setting is '''Tools''' > '''Options''' > '''Advanced''' > '''General''' > [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u '''Use hardware acceleration when available''']. All these settings/options/add-ons can also be individually or collectively disabled/enabled/changed in Firefox normal mode to check if an extension, theme, option or hardware acceleration is causing issues. Disabling/enabling hardware acceleration, and some types of add-ons in normal mode may require a Firefox restart.
    [http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
    [http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.org/en-US/kb/Options%20window Options]

  • How can I write this string to a file as the ASCII representation in Hex format?

    I need to convert a number ( say 16000 ) to Hex string ( say 803E = 16,000) and send it using Visa Serial with the string control in Hex Mode. I have no problem with the conversion (see attached). My full command in the hex display must read AA00 2380 3E...
    I can easily get the string together when in Normal mode to read AA0023803E... but how can I get this to hex mode without converting? (i.e. 4141 3030 3233 3830 3345 3030 3030 3031 )
    Attachments:
    volt to HEX.vi ‏32 KB

    Sorry, The little endian option was probably introduced in 8.0 (?).
    In this special case it's simple, just reverse the string before concatenating with the rest.
    It should be in the string palette, probably under "additional string functions".
    (note that this only works in this special case flattening a single number as we do here. If the stat structure is more complex (array, cluster, etc.) you would need to do a bit more work.
    Actually, you might just use typecast as follows. Same difference.
    I only used the flatten operation because of the little endian option in my version.
    Message Edited by altenbach on 11-16-2007 11:53 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    littleendian71.png ‏4 KB
    littleEndiancast71.png ‏4 KB

  • I have a ipad with all of my songs on it, my old computer recently shut down and now i want to download all of my songs on my ipad to my new itunes. how can i do this without erasing all of my music?

    my computer recently shut down and all of my itunes was lost.  My ipad still has all of my songs on it. How can i download all of my music onto my new itunes. would i need a different acount?

    You should be able to:
    Backup the device to the new installation
    Transfer your purchases into a newly authorized library
    Recover any other media using third party tools as suggested in this post from forum regular Zevoneer
    Restore the device from the backup
    This process should switch the association of the device to the new library, preserving the data and settings in your apps.
    May also be prudent to attempt a backup to iCloud directly from the device before you start... Settings > iCloud > Storage & Backup > iCloud Backup > On. It won't save any media but it would preserve the general account settings and documents in case anything goes wrong while you are trying to extract your other data.
    When you get it all fixed, make a backup!
    tt2

  • Ipod touch genre duplicates itself in my music list. So both genres have the same list of songs.. how can i correct this?

    My ipod touch music genre has duplicated itself, with both list having the same sets of songs. this is very annoying as i have multiple genres that i listen to. how can i fix this

    Now, is it synced via wireless or USB?
    When I upgraded my 4 to iOS 7, I had that very problem. The phone said all my music was on it, but when I tapped on a song, it would show the icon as though it was playing and after a couple if seconds, it would skip to the next song.
    Here's what I did: Reconnect and do another sync. Or, back-up your phone, do a restore and then trying syncing your files again.
    I hope this helps

  • How can I write this small function to create number of Array(s), please?

    Guys,
    How can I have a function create Array depending upon the passed argument. Am I doing this right?
    function createArray(n:int):Array
        for(var i:int=0; i<n; i++)
           var nArr = new Array();
           return nArr[i];
    Thanks a lot.

    var aArraySet:Array = createArraySets(5); //create 5 arrays
    // Array 1 -> aArraySet[0]
    // Array 2 -> aArraySet[1]
    // Array 3 -> aArraySet[2]
    // Array 4 -> aArraySet[3]
    // Array 5 -> aArraySet[4]
    function createArraySets(n:uint):Array
        var aArraySet:Array = new Array();
        for(var i:uint=0; i<n; i++)
           aArraySet.push(new Array());
        return aArraySet;

  • How can I write this SQL?

    the statement have the question:
         stxh-tdname  length 70
         itab-vbeln       length 10
    select tdobject into table it_stxh
        from stxh
        for all entries in  itab
        where ( tdid = 'Z006' and tdspras = 'E'      and tdname+0(10) = itab-vbeln and tdobject = 'VBBK' ).
    tdname+0(10) = itab-vbeln  ???

    When you define the first Internal Table ITAB, define vbeln as the same type of stxh-tdname.
    Eg.
      data: begin of itab occurs 0,
              vbeln like STXH-TDNAME,
              erdat like vbak-erdat,
              end of itab.
    START-OF-SELECTION.
    Select VBELN
              ERDAT
      from vbak
      into CORRSPONDING FIELDS of table itab.
    Then you can directly use  this ITAB in the next query
      select tdobject into table it_stxh
      from stxh
      for all entries in itab
      where ( tdid = 'Z006' and tdspras = 'E' and tdname = itab-vbeln
      and tdobject = 'VBBK' ).
    Pls reward it if it is useful.

  • I want to pass my lists from an old computer for a new computer how can i do this?????

    please i need to know it urgent, please help me thank you

    See this Apple support document for different ways to copy your iTunes library from one PC to another.
    iTunes: How to move your music to a new computer
    B-rock

  • I have a new iPod Touch but some of the albums aren't grouping correctly and are just listing the songs individually, how can I fix this?

    I got an iPod touch as a Christmas gift to replace an old broken iPod Nano, and it's worked fine apart from this thing with the Albums.  Certain Albums (Albums made up of individual songs by different artists) aren't properly grouping into a single Album, but instead turns each individual song into it's own Album unless the songs are by the same artist, this is really weird since the old Nano never had this issue.  I'm not sure what causes this or how to fix it, I thought maybe turning off "Group by Album Artist" in settings would do the trick but that doesn't seem to have done anything.  Basically I just want to get these songs properly grouped into a Single Album instead of as individual albums for each song and was curious if anyone knew how to do this.
    I do apologize if this is confusing, I'm not really sure how to describe the problem. 

    I feel your pain!  I have the same exact problem.  Have you gotten a solution yet?

  • How can I write this short/simple bit of php so it will work?

    Hello!
    I have this code in template.php...
    <?php @ require_once ("$pagename.php"); ?>
    ...to bring content into the template.
    I've got a folder called 'news' for all the news articles so
    how could I edit the code to say 'look for files in the news folder
    as well as the current folder'?
    I guess I would need something like:
    <?php @ require_once ("$pagename.php" or
    "news/$pagename.php"); ?>
    ...but that doesn't work. How would I change it to work?
    Thank you very much and hope to hear from you.
    Mark

    You would need to use the "or" operator in PHP. I'm not too
    sure if that
    will work or not but you can give it a go - I'm currently at
    work now, so I
    can't really test anything at this moment in time.
    This is the operator for "or" in PHP: ||
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    ===============================
    Proud GAWDS Member
    http://www.gawds.org
    Delivering accessible websites to all...
    ===============================
    "Spindrift" <[email protected]> wrote in
    message
    news:e5fhh5$sgv$[email protected]..
    > Hello!
    >
    > I have this code in template.php...
    >
    > <?php @ require_once ("$pagename.php"); ?>
    >
    > ...to bring content into the template.
    >
    > I've got a folder called 'news' for all the news
    articles so how could I
    > edit
    > the code to say 'look for files in the news folder as
    well as the current
    > folder'?
    >
    > I guess I would need something like:
    >
    > <?php @ require_once ("$pagename.php" or
    "news/$pagename.php"); ?>
    >
    > ...but that doesn't work. How would I change it to work?
    >
    > Thank you very much and hope to hear from you.
    >
    > Mark
    >

  • I know have a mobile me account and so my apple id is switched from my email address.  i am trying to update my apps but it won't let me as it won't recognize my new 'ID'. how can i fix this on my iphone?

    I have mobile me account now and so my apple id is switched from my email address to my mobile me address.  Since I have made this change I can't update my apps. Everytime I try to sign in it won't recognize the switch. I have updated all the proper information on my iphone, however, when updating apps it still shows my apple id as my email address and not the mobile me account address. I am not sure what else to do???  I have even sync'd my iphone and tried to do it through my pc, however, it says that it can't update (nothing to update). I have ten updates sitting on my iphone apps...What to do...what to do?  Very confused.

    Where are you trying to log in? You should be able to change your ID at http://appleid.apple.com - can you log in there?
    Before you change your ID you should log out of the iTunes Store and on any devices which are logged into iCloud. Then once you've changed it you can log back in with the new ID. (Your iCloud synced data will disappear from the device when you do this but will reappear when you sign back in - give it time).
    If you are unable to sign into http://appleid.apple.com you will need to contact Support. Go to http://iforgot.apple.com and sign in with your iCloud login. A new password will be sent to your associated email address. If this doesn't work you will have to contact Support. Go to https://getsupport.apple.com . Click' See all products and services', then 'More Products and Services, then 'Apple ID', then 'Other Apple ID Topics' then 'Lost or forgotten Apple ID password'. If you have any problems with that try this form: https://www.apple.com/emea/support/itunes/contact.html

  • How can we write this in analytical function..

    select a.employee_id,a.last_name,b.count from employees a, (select manager_id, count(manager_id) as count from employees group by manager_id) b where a.employee_id=b.manager_id;
    As per my requirement I need each manager name and no of employees reporting to him... above query works.. Could anybody help to write the same using analytic function.... Hw this same can be written in effiect way??? (quick performance)
    Please also share the link to download some doc to have good understanding of analytical function..
    Thanks in advance....

    are you trying to do a hierarchical type of query?
    select ename, count(ename) -1 numr_of_emps_under_this_mgr  from  emp
    connect by  empno =prior mgr
    group by ename
    order by count(ename) desc ;
    ENAME     NUMR_OF_EMPS_UNDER_THIS_MGR
    KING     13
    BLAKE     5
    JONES     4
    CLARK     1
    FORD     1
    SCOTT     1
    ADAMS     0
    TURNER     0
    MARTIN     0
    JAMES     0
    SMITH     0
    MILLER     0
    ALLEN     0
    WARD     0Here is the table structure I used (I think you can download it from oracle somewhere)
    CREATE TABLE EMP
      EMPNO     NUMBER(4)                           NOT NULL,
      ENAME     VARCHAR2(10 BYTE),
      JOB       VARCHAR2(9 BYTE),
      MGR       NUMBER(4),
      HIREDATE  DATE,
      SAL       NUMBER(7,2),
      COMM      NUMBER(7,2),
      DEPTNO    NUMBER(2)
    SET DEFINE OFF;
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7369, 'SMITH', 'CLERK', 7902, TO_DATE('12/17/1980 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        800, 20);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (7499, 'ALLEN', 'SALESMAN', 7698, TO_DATE('02/20/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        1600, 300, 30);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (7521, 'WARD', 'SALESMAN', 7698, TO_DATE('02/22/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        1250, 500, 30);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7566, 'JONES', 'MANAGER', 7839, TO_DATE('04/02/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        2975, 20);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (7654, 'MARTIN', 'SALESMAN', 7698, TO_DATE('09/28/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        1250, 1400, 30);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7698, 'BLAKE', 'MANAGER', 7839, TO_DATE('05/01/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        2850, 30);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7782, 'CLARK', 'MANAGER', 7839, TO_DATE('06/09/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        2450, 10);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7788, 'SCOTT', 'ANALYST', 7566, TO_DATE('12/09/1982 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        3000, 20);
    Insert into EMP
       (EMPNO, ENAME, JOB, HIREDATE, SAL, DEPTNO)
    Values
       (7839, 'KING', 'PRESIDENT', TO_DATE('11/17/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        5000, 10);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (7844, 'TURNER', 'SALESMAN', 7698, TO_DATE('09/08/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        1500, 0, 30);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7876, 'ADAMS', 'CLERK', 7788, TO_DATE('01/12/1983 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        1100, 20);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7900, 'JAMES', 'CLERK', 7698, TO_DATE('12/03/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        950, 30);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7902, 'FORD', 'ANALYST', 7566, TO_DATE('12/03/1981 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        3000, 20);
    Insert into EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
    Values
       (7934, 'MILLER', 'CLERK', 7782, TO_DATE('01/23/1982 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        1300, 10);
    COMMIT;

Maybe you are looking for