Java - how to solve this warning in Eclipse?

Discussion in 'Software' started by princess.d, Jul 8, 2008.

  1. princess.d

    princess.d

    Joined:
    Jul 8, 2008
    Messages:
    2
    Likes Received:
    0
    I have the code as below:
    public void update(Vector<String> names, String[] params){
    }

    But there is the error message that:
    Vector: this type vector is not generic;it cannot be parameterized with the arguments String.
    String: Syntax error,parameterized type are only available if the source is level 5.0

    Can anyone tell me what it means and give an example of how I can get rid of the warnings?
     
    princess.d, Jul 8, 2008
    #1
    1. Advertisements

  2. princess.d

    princess.d

    Joined:
    Jul 8, 2008
    Messages:
    2
    Likes Received:
    0
    help me~

    It seems to be a problem in generic type.
    How could I modify the code?
    :oops:
     
    princess.d, Jul 8, 2008
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.