New HashMap K,V ().put("A", "B") doesn't work

I try to replace old methods that use Properties parameter with new methods using a Map<K,V> parameter instead. My problems are the old methods that I change to @deprecated and reimplement to use the new Map<K,V> data but convert them from input Properties. But code like this:
Map<K,V> map = new HashMap<K,V>();
map.put("A", "B");doesn't compile: The method put(K, V) in the type Map<K,V> is not applicable for the arguments (String, String).
How can I resolve this?

I'm surprised the first line is even compiling - unless you happen to have types named K and V in your code somewhere?
K and V are the names of parameters. In this case, type parameters. They need to be replaced with actual types. Just like the named parameters to methods need to be replaced with actual values.
Try:
Map<String, String> map = new HashMap<String, String>();
map.put("A", "B");

Similar Messages

  • I came into the store because my middle button was not working. Then they gave me a middle button that's on the screen of my phone. I got a new phone do now my middle button doesn't work but I still have the internal digital button, how do I remove it?

    I came into the store because my middle button was not working. Then they gave me a middle button that's on the screen of my phone. I got a new phone do now my middle button doesn't work but I still have the internal digital button, how do I remove it?

    Settings>General>Accessibility>(scroll down to)AssitiveTouch and change to Off

  • TS2565 when updated to 9.1.7 from 9. I need new serial and the old serial number doesn't work. How can i solve this?

    when updated to 9.1.7 from 9. I need new serial and the old serial number doesn't work. How can i solve this?

    There was no new serial needed to update from Logic 9 to 9.1.7
    If your Logic 9 was an upgrade from Logic 8 it may be asking you for your original Logic 8 Full serial first and then your Logic 9 Upgrade serial...
    Otherwise, it's best to call Apple directly and get them to help you...

  • HT2404 I'm trying to update apps and download new ones on mi ipad, but it doesn't work... the icons say "waiting" and nothing happens for days!

    I'm trying to update apps and download new ones on mi ipad, but it doesn't work... the icons say "waiting" and nothing happens for days!Help!

    Here are a bunch of things that you can try to get the downloads to resume.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Make sure that you do not have a stalled download in iTunes - a song or podcast .... if you have a download in there that did not finish, complete that one first. Only one thing can download at a time on the iPad so that could be what is causing the problem.
    If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>iTunes & App Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.
    You can also try deleting the waiting icons - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again.
    You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your app preferences and device settings again.
    If all else fails, download the updates or the apps in iTunes on your computer and then sync the content to your iPad.

  • Brand new Mac Pro.. CD DRIVE DOESN'T WORK!

    I just set up my new Mac Pro yesterday, and the cd/dvd drive doesn't work. It worked once, when I was installing a printer, but it made a really bad noise, and now whenever I put any cd or dvd in, it doesn't even recognize it or react.
    I don't know what to do.
    I know I have a warranty so somebody from apple should be able to help me, but I can't even reach anybody on the customer support phone number.
    Does anybody know a way to fix this?

    Try depressing the SMC RESET button for 10 seconds, small round button under drive #4 in the rear (with unit unplugged).

  • HT201272 All my books disappeared when I bought a new computer and the download previous purchases doesn't work. Any suggestions will be appreciated.

    This is a problem I'm sure many people have had.
    I purchased several books a few weeks prior to purchasing a new computer. When I set it up using the file I had been saving to for the last couple of year I see that several of the Audio Books I had bought some as late as a few days prior, were missing.
    They're on my purchase list on the apple site but it doesn't let me download them so im stuck. I'm sure apple would just love it if I gave it the old American't try and gave up and called a loss and purchased them all over again.
    I've been using iTunes to make these purchases since they started iTunes. Since this isn't the first time its happened maybe I should call it all a loss and go shopping for another medium.
    Anyones help will be appreciated.
    Thanks
    Appler5210

    You say "ipod nano" in the subject line, but this is the forum category for the iPod shuffle (and you later say "ipod shuffle" in the post).  Is your iPod a shuffle or a nano?
    Even if iTunes is not installed, an iPod should charge when connected to an active USB port that is supplying sufficient power.  What indicates to your that the iPod is not charging?

  • When I open new tabs using middle click or "Open link in new tab", the "reload current page" button doesn't work.

    Doesn't matter how many times I click it. It just does nothing.

    Do you have the Ask toolbar? If you do uninstall the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and Firefox that prevents new tabs from being opened.
    If you do not have the Ask toolbar, check for another add-on that could be causing this, for details of how to do that see https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • New power adapter for old macbook - It doesn't work!

    Hello!
    My MacBook is 3 years old. My power adapter got broken at the end where you put it into the socket.
    Now I bought a new power adapter. The adapters have changed now. The end where you put it into the computer looks now a little bit different. But they told me in the Apple Store that it will also fit my 3 years old Macbook.
    At home it really fit my Macbook but it didn't charge. Nothing happened, no light. How can that be? Then I combined the two, the end for the socket of the new power adapter and the other part where you put it into the computer of my old power adapter. Now it charges. So is the problem after all the part where you put it into the computer of the new power adapter that looks different now?
    Or what can I try now?
    Thank you for help!
    Sorry for my bad English.
    xenchen
    Message was edited by: xenchen

    You may need to download and install the SMC firmware update:
    http://support.apple.com/kb/DL1312?viewlocale=en_US

  • Migrating to new macbook air with Lion, entourage 2008 doesn't work

    I  bought a new macbook air with lion installed. trying to migrate data from my old macbook with snow leopard. Got most data across, and installed my most frequently used applications:
    - office 2008: most office apps 2008 work, if buggily. entourage not, see below.
    - firefox (hangs up when downloading updates)
    - dropbox (ditto)
    <these two problems may have something to do with internet proxy settings, will try to sort that out later>
    MAIN ISSUE:
    entourage wont open at all.  so for now i'm using my old comp for e-mail and the new for the rest.
    MY OPTIONS:
    please advise (1) what you think is the most time & nerve-saving option (2) how to do it smoothly:
    A) try to get office 2008 to work.
    when trying to open entourage, it tells me this version (office 2008 12.0) cannot open this entourage database (12.3)
    error for other apps says there is a problem with database, and rebuilding several times did not fix it.
    would have to start with updating to the version i used last (office 2008 12.3). Problem is the ms office updater does not seem to work on lion. the first update does not open, says it does not support powermac.
    B) buying office 2011, and migrating entourage 2008 to outlook.
    I suppose the best way to do this is to install office 2011 on the old mac first, then on the new one, then move database, right?
    C) migrating from entourage 2008 to lion mail.
    best way to do this would be to import entourage email to leopard mail, then move those files to the new mac?  and move entourage addresses into the mac addressbook. my major concern is that i have a lot of mailing rules, and a fair bunch of notes. a lot. i;d rather not have to recreate those by hand. Is there a way to import rules from entourage to mail?
    i also habe a huge backstock of mail, over 10,000, and a correspondigly huge addressbook (within entourage). i'm ready to abandon entourage at last (though i used it for a decade), but i want to have my addresses, my rules, and at least the last 3 yrs of emails. i get about 130 mails a day so i need plenty of automatic organizing capability.
    i never had issues  my old mac/snow leopard, i just ran out of ram and the one usb broke, so i figured it's time. kinda sorry i did not just get the usb repaired and extra ram. what a hassle these migrations always are.
    cheers!
    maedi

    Kappy wrote:
    Yes, repairing first is a sound idea. In my experience I've only moved from Entourage to the OS X applications or from one version of Entourage to another. In the latter I've been able to just copy over the Microsoft User Data folder. But I have not used Entourage for quite some time.
    Microsoft don't make it quite that easy to migrate to their own applications, but the import from a 'tidy' .rge file works well, I had a lot of issues with the first few I migrated but after performing a database repair prior to import all proceeded smoothly.

  • How to have roboform toolbar on my safari - i had it before, but i just downloaded the new mac os x lion, and it doesn't work,

    hi, i just downloaded the new os x lion - and when i open the safari - i cant see the roboform toolbar.
    i tried to donwload again the roboform, but i cant see the toolbar in the safari.
    thanks,

    What worked for me was:
    1. After installing new Roboform close open instances Safari and Roboform
    2. Open Roboform
    3. Open Safari
    It shoud then automatically add the toolbar.
    Best regards,
    Evert
    By the way:
    A check for update from within Roboform does not work. You must download it from the website (v 0.9.30)

  • TS2755 Since the new update...My text messaging doesn't work???? I need help, I've tried everything...

    Is anyone else having a problem with their text messaging since the new update?? If so, how did you fix it???

    I seem to be having a similar problem. Since updating to iOS 7 my text messages are consistently getting the message send failure. I-messaging is fine, it appears to only happen with simple text messages to non-iPhone users. Maybe 1 out of 5 goes through on the first try.
    Tried all the usual suspects. Checked settings. Restarted phone.

  • I downloaded the new mozilla and it installed, but it doesn't work.

    It just shows the home page but wont go to any websites. it doesn't even seem to load. explorer works and chrome works. what do I do?

    It could be that your security software is blocking Firefox. See [[Firefox cannot load websites but other programs can]] and [[Cannot connect after upgrading Firefox]].

  • I used to have tabs that reloaded every few minutes, but I downloaded the new Tab Mix Plus and now it doesn't work

    I used to have my tabs reload every 2 - 5 minutes. I downloaded the new Tab Mix Plus and now when I click on "Reload all tab: button I don't get the drop down box any longer.
    Steve

    Tab Mix Plus support is here. <br />
    http://tmp.garyr.net/forum/

  • My iMac got a new logic board, now my HP printer doesn't work

    I have had my Intel iMac 24" using OS 10.7.5 in the shop a lot lately. One of the things they replaced was the logic board. Now my iMac seems to be working great, but my HP printer stopped working. It's and older printer, Officejet All-in-One. I tried removing the driver and software to reinstall but it says the disc will not work because the iMac is no longer a PowerPC. That's how old the printer is. Is this a techology thing, is the printer just to old, or is there something I can do to fix this. Should it at least recognize that a printer is connected. The printer is not recognized at all, that is, it says no printer is connected and even when I try to add a new printer, it does not show up in the list. So there is no way of trying to add it back, to the iMac, there is no printer connected as far as it's concerned.

    Do you have a backup of your previous install?
    Mac OS X: About the Reset Printing System feature ...
    http://support.apple.com/kb/HT1341?viewlocale=en_US
    10.5/10.6/10.7 instructions...
    In System Preferences>Fax & Print, Right click or Control+click on the Printers list Sidebar, choose Reset Printing System.
    if you hold option and click the "-" tab it resets the printing system.
    http://www.macosxhints.com/article.php?story=20031215144430486
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions.
    Any devices that previously appeared in your Printer List and Fax List will need to be added again after resetting the printing system.
    Resetting the printing system in Mac OS X 10.5.x+++
    To use the Reset Printing System feature in Mac OS X 10.5.x, follow these steps:
    Choose System Preferences from the Apple menu.
    Choose Print & Fax from the View menu.
    Control-click on list of printers on the left side of the window, then choose "Reset printing system" from the contextual menu. If you don't see a list of printers, Control-click on the text "Click + to add a printer or fax" and select "Reset printing system..."
       As an alternative, if you currently have one or more printers listed, you can Option-click the "-" (Remove printer) button.
    http://support.apple.com/kb/ht1341
    Reboot.
    You don't say which model, but have you checked hp's site for a newer driver...
    Or even Apple's?
    http://support.apple.com/kb/DL907

  • Will Apple replace my brand new iPad 2 if the home button doesn't work?

    I recently got a brand new iPad 2 and as soon as I opened up and set it up I realized the home button didn''t work. However, sometimes the home button will start working and within minutes will stop again. I know this isn't normal for a brand new device.
    My iPad is still in warranty, so I'm wondering if I take it to the genius bar will they replace it?

    yes that's what happened to my ipod touch and they replaced it

Maybe you are looking for