Please help, 2D Array of Vectors and Incompatible types :(

I have a 2D array of vectors called nodeLocations but when I try and access the vector inside I get a compile error.
My code is something like this:
nodeLocations[j].addElement(noArc)
My editor picks up that its a Vector and shows me addElement as an acceptable entry to put after the "." yet the compiler says:
"addElement(java.lang.Object) in java.util.Vector cannot be applied to (int)"
Can someone please help?
Thank you in advance.
also a related problem:
I get inconvertible types (says int required) when I try and get an element from a vector stored in a 2D Array. I know that it comes out as an object and so should be cast but it does not seem to work. My code is as follows:
else if (((int)(nodeLocations[nodeNumber][adjNodeNumber].elementAt(0))) != distance)
I would appreciate any help anyone can give.
Similar errors to the above two happen when
I try a push with a Stack in a vector.
I try to get something out of the stack inside the vector.

The Vector class's addElement() method requires an Object parameter. It appears that you're trying to add an int to the Vector. You'll need to create an Integer object and place that into the vector (see sample below) or use the pre-release version of JDK 1.5 which provides autoboxing capabilities.
int z = 5;
Integer x = new Integer(z);
nodeLocations[j].addElement(x);

Similar Messages

  • Hi Guys,  I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out

    Hi Guys,
    I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out as this web-site has been payed for by my client.
    Alex

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • My microphone is not working on my IPAD 4... It's version is 7.0.4. Please help me coz i cant my sister in HK can't hear me on skype. It's our only way of keeping in touch. Im so helpless. Please help me. Thank u and God bless everyone.

    My microphone is not working on my IPAD 4... I can't figure out if the problem has something to do when i updated the version. It's version is 7.0.4. Please help me coz i cant my sister in HK can't hear me on skype. It's our only way of keeping in touch. Im so helpless. Please help me. Thank u and God bless everyone.

    Have you tried reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • Please help , I have iPhone 4S and have updated to iso6, don't know if that has anything to do with the problem but I can't set the year on date and time to the correct year, it automatically goes to 2578 ? Plz help

    Subject:
    Please help , I have iPhone 4S and have updated to iso6, don't know if that has anything to do with the problem but I can't set the year on date and time to the correct year, it automatically goes to 2578 ? Plz help

    Settings>General>International.
    Set the calendar to "Gregorian". You have it set to Buddhist.

  • I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    video
    What version of Premiere Elements do you have and on what computer operating system is it running?
    Please review the following workflow.
    ATR Premiere Elements Troubleshooting: PE11: Project Assets Organization for Scene and Highlight Grabs from Collection o…
    But please also determine if your project goal is supported by
    a. format of your source
    and
    b. computer resources
    More later based on details that you will post.
    ATR

  • I have updated my iPhone 4s to iOS7 but when i connect it to itunes on my PC it give me a msg to restore your iPhone in summary tab, Please help m using win 7 and updated itunes.

    I have updated my iPhone 4s to iOS7 but when i connect it to itunes on my PC it give me a msg to restore your iPhone in summary tab, Please help m using win 7 and updated itunes.

    What is showing on the screen of the iPhone?
    Does iTunes say the iPhone is in recovery mode?

  • I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    So just to be clear, when you say "just bought" how long ago was that? Is it on this new iPhone that you had pictures, texts, etc that you want? Were you backing up to iCloud or onto iTunes?
    This may not help for everything but if you go to iCloud.com and log in, are you able to find your pictures there?

  • Please help! - My computer crashed and I need help reinstalling my CS3 software

    Please help!  My computer crashed and now I am trying to reistall my CS3 software.  I'm receiving Unable to Install errors for all of the programs in the Suite except the Acrobat 8 Professional.  Can someone please help me?  I cannot afford to upgrade, but need this software to do freelance work.  I own the software and serial number but Adobe will not support me as it is an older version.

    I downloaded and ran the Creative Suite Cleaner Tool.  It showed no files to remove, but still said it was successful.  I then tried reinstalling the entire suite.  Acrobat 8 Professional was the only program that installed.  All other programs gave me a componant failed error.  Any other advice would be greatly appreciated?!
    Thanks

  • Blank screen in itunes store-please help im not very technical and when i click on my itunes app the screen is blank how can i fix this please?

    Blank screen in itunes store-please help im not very technical and when i click on my itunes app the screen is blank how can i fix this please?

    See if any of the following fix it.
    Try logging out of your account on your phone by tapping on your id in Settings > iTunes & App Store and tap 'Sign Out' on the popup and then log back in.
    If that doesn't fix it then try closing the iTunes store app via the phone's multitasking bar and see if it works properly when you open the app : double-click the home button to open the taskbar and then swipe or drag iTunes from there up and off the top of the screen to close it, and the click the home button to close the taskbar.
    A third thing to try is a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the equivalent of a reboot.

  • Please help! I have photoshop and iphoto does not show it in my preferences edit window. How do I get it as an option in my preferences.

    Please help! I have photoshop and iphoto does not show it in my preferences edit window. How do I get it as an option in my preferences.

    I tried it and nothing changed. Even when I right click on an indiviual image all it does is duplicate it. Iphoto seems to be recognizing my external hard drive as an editor......cannot get photoshop except to drag a picture into photoshop from iphoto, and once I have worked on it and saved it to iphoto I cant find it anywhere.

  • Hello sir i have IPhone 5 this imei is : ******** and i but my mail and password but the icloud tell me its wrong please help me my mail is : ********  and my password is ********

    hello sir i have IPhone 5 this imei is : ********** and i but my mail and password but the icloud tell me its wrong please help me my mail is : *********
    and my password is *******
    <Personal Information Edited by Host>

    You might try the following steps:
    Restart the device by holding down the on/off button until the power down slider appears.
    Try entering your password in another location (i.e. when you are using a different wifi network)
    Reset all settings (settings > general > reset), this resets some of your settings to factory default. It’s not a complete removal of settings. It removes all of your preferences for Wi-Fi, Bluetooth, Do No Disturb, Notifications, General, Sounds, Brightness & Wallpaper and Privacy. It does not remove any of your data.
    Try signing out of iCloud and back in (only if find my phone is disabled)
    If this doesn’t help your best option may be to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.

  • Hi Rstor work for the iPhone 5 remains 4 hours Standby Please please help as soon as possible and thank you

    Hi Rstor work for the iPhone 5 remains 4 hours Standby Please please help as soon as possible and thank you

    These are user-to-user forums, you are not talking to Apple here - I've asked the hosts to remove your phone number from your post.
    You can contact iTunes support via email via this page and ask them why the message is appearing : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • My ipod keeps asking me to restore and when i do restore it just restarts and asks me to connect to itunes and starts again.please help its my sons bday and this is his present

    my ipod keeps asking me to restore and when i do restore it just restarts and asks me to connect to itunes and starts again.please help its my sons bday and this is his present

    Maybe:
    Restore loop (being prompted to restore again after a restore successfully completes)
    Troubleshoot your USB connection. If the issue persists, out-of-date or incorrectly configured third-party security software may be causing this issue. Please follow Troubleshooting security software issues. .
    Next try placing in DFU mode and then restoring.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    Then try restoring on another computer.
    Last, make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • MASSIVE OS X Server crashing!  Please help me!  SMB crashes and kills OSXS

    OSX Srvr 10.4.7 on a Mac Pro. I dont know what I did or missed versus every other server I've ever done, but I've got a major problem on my hands. Once a day my users have their access shut off, and i have to re-enable them. Every other morning, smb will crash so hard it kicks everyone off, then workgroup mgr won't respond anymore, and i have to hard power off the computer. This is running my company of roughly 23 users, and this replaced a Windows Server 2003. Not a good impression so far. I have logs I'm happy to post or email to anyone. They're huge, so I've obviously loused something up big time.
    We're doing simple Windows file Sharing, Apple File Sharing, VPN, and eventually FTP. It's also running Kerio Mail Server. Someone please help me!
    Here are some log examples to start with.
    crashreporter.log:
    Wed Sep 20 17:49:42 2006 crashdump[16094]: crashdump started
    Wed Sep 20 17:49:42 2006 crashdump[16094]: Started writing crash report to: /Library/Logs/CrashReporter/smbd.crash.log
    Wed Sep 20 17:49:42 2006 crashdump[16094]: Finished writing crash report to: /Library/Logs/CrashReporter/smbd.crash.log
    Wed Sep 20 17:49:42 2006 crashdump[16097]: crashdump started
    Wed Sep 20 17:49:43 2006 crashdump[16097]: Started writing crash report to: /Library/Logs/CrashReporter/smbd.crash.log
    Wed Sep 20 17:49:43 2006 crashdump[16097]: Finished writing crash report to: /Library/Logs/CrashReporter/smbd.crash.log
    system.log:
    Sep 20 17:49:42 Genesis1 crashdump[16094]: smbd crashed
    Sep 20 17:49:42 Genesis1 crashdump[16094]: crash report written to: /Library/Logs/CrashReporter/smbd.crash.log
    Sep 20 17:49:43 Genesis1 crashdump[16097]: smbd crashed
    Sep 20 17:49:43 Genesis1 crashdump[16097]: crash report written to: /Library/Logs/CrashReporter/smbd.crash.log
    Sep 20 17:51:56 Genesis1 kernel[0]: (16266: ps)tfp: failed on 0:
    Sep 20 17:51:57 Genesis1 kernel[0]: (16267: ps)tfp: failed on 0:
    Sep 20 17:51:58 Genesis1 kernel[0]: (16268: ps)tfp: failed on 0:
    Sep 20 17:51:59 Genesis1 kernel[0]: (16269: ps)tfp: failed on 0:
    Sep 20 17:52:00 Genesis1 kernel[0]: (16270: ps)tfp: failed on 0:
    Sep 20 17:54:21 Genesis1 servermgrd: servermgr_dns: no name available via DNS for 192.168.200.250
    Sep 20 17:54:21 Genesis1 servermgrd: servermgr_dns: no hostname set and unable to detect via DNS, services may not function properly - use changeip to repair
    log.smbd:
    [2006/09/20 17:56:27, 0] /SourceCache/samba/samba-100.4/samba/source/lib/utilsock.c:write_socketdata(446)
    writesocketdata: write failure. Error = Broken pipe
    [2006/09/20 17:56:27, 0] /SourceCache/samba/samba-100.4/samba/source/lib/utilsock.c:writesocket(471)
    write_socket: Error writing 124 bytes to socket 6: ERRNO = Broken pipe
    [2006/09/20 17:56:27, 0] /SourceCache/samba/samba-100.4/samba/source/lib/utilsock.c:sendsmb(663)
    Error writing 124 bytes to client. -1. (Broken pipe)
    [2006/09/20 17:56:27, 0] /SourceCache/samba/samba-100.4/samba/source/lib/utilsock.c:write_socketdata(446)
    writesocketdata: write failure. Error = Broken pipe
    [2006/09/20 17:56:27, 0] /SourceCache/samba/samba-100.4/samba/source/lib/utilsock.c:writesocket(471)
    write_socket: Error writing 53 bytes to socket 6: ERRNO = Broken pipe
    [2006/09/20 17:56:27, 0] /SourceCache/samba/samba-100.4/samba/source/lib/utilsock.c:sendsmb(663)
    Error writing 53 bytes to client. -1. (Broken pipe)
    Please reply here or consider emailing me: [email protected]
    I'm desperate!
    Mac Pro dual 2.66 Xeon   Mac OS X (10.4.7)  

    Hi Bill.
    First please note:
    "servermgr_dns: no name available via DNS for 192.168.200.250
    Sep 20 17:54:21 Genesis1 servermgrd: servermgr_dns: no hostname set and unable to detect via DNS, services may not function properly - use changeip to repair"
    Your first issue is you need to fix DNS.
    Something needs to be providing forward and reverse DNS lookup for your OS X Server.
    You might not have known this, but now you do: OS X Server -must- have working DNS. You don't need to run DNS on your OS X Server, but it needs working DNS.
    DNS configuration is a bit beyond the scope of this reply, however.
    In the meantime, edit /etc/hosts and do not touch any existing entries
    but add the following line:
    192.168.200.250 Genesis1
    and kill -HUP lookupd. If you're not sure how, perhaps just restart the computer.
    Next up, edit
    /System/Library/LaunchDaemons/smbd.plist , adding the line in bold below:
    <key>ProgramArguments</key>
    <array>
    <string>/usr/sbin/smbd</string>
    <string>-F</string>
    </array>
    Of course, the text in the file itself should NOT be "bold" formatted
    Be very sure to check the permissions on that file, and to leave them the same, or restore them if they change. It's really best to use nano/vi/emacs to edit the file, if you must use a GUI app, then go with TextWrangler or SubEthaEdit, both of which can be found at versiontracker.com
    Let us know how it goes, and I'll send this to your email as well.

  • Please help - printing arrays problem

    Please help - i am currently loading data from a text file
    into flash using an array and loadVars......however when the data
    is loaded into the text box in flash there is a comma after
    it.......i tried using 'join()' but that didnt seem to work :( it
    just meant my variable was undefined. So any suggestions on how to
    delete commas from returned arrays would be great :)
    Thanks
    Jude

    this is the code i have atm..........i got help to remove the
    'undefined' off another post i had open..........and i finally got
    it working........will the removing comma's be along the same
    lines??
    _global.aone = new Array();
    _global.aone[0] = new Array();
    _global.aone[1] = new Array();
    _global.bone = new Array();
    _global.bone[0] = new Array();
    _global.bone[1] = new Array();
    _global.bone[2] = new Array();
    _global.cone = new Array();
    _global.cone[0] = new Array();
    _global.cone[1] = new Array();
    _global.done = new Array();
    _global.done[0] = new Array();
    _global.done[1] = new Array();
    function removeUndefined(inp:String):Array {
    var s = inp.split(",");
    var temp_array:Array = new Array();
    for (var i = 0; i<s.length; i++) {
    if (String(s
    ) != "undefined") {
    temp_array.push(s);
    return temp_array;
    var mydata:LoadVars = new LoadVars();
    mydata.load("answer.txt");
    mydata.onLoad = function(ok:Boolean) {
    if (ok) {
    _global.aone[0] = removeUndefined(mydata.QuestionOneA);
    _global.aone[1] = removeUndefined(mydata.QuestionTwoA);
    _global.bone[0] = removeUndefined(mydata.QuestionOneB);
    _global.bone[1] = removeUndefined(mydata.QuestionTwoB);
    _global.bone[2] = removeUndefined(mydata.QuestionThreeB);
    _global.cone[0] = removeUndefined(mydata.QuestionOneC);
    _global.cone[1] = removeUndefined(mydata.QuestionTwoC);
    _global.done[0] = removeUndefined(mydata.QuestionOneD);
    _global.done[1] = removeUndefined(mydata.QuestionTwoD);
    } else {
    trace("Failed to load text.");
    trace(_global.aone[0]);
    trace(_global.aone[1]);
    trace(_global.bone[0]);
    trace(_global.bone[1]);
    trace(_global.bone[2]);
    trace(_global.cone[0]);
    trace(_global.cone[1]);
    trace(_global.done[0]);
    trace(_global.done[1]);
    };

Maybe you are looking for

  • Process order required for each sales order without mrp run

    Hi, it is mto scenario. wants system to create a process order for each sales order without running mrp. please advise is it possible? if possible please guide what settings need to be done. Thabk you.

  • What parameters should be changed in context file of oracle apps

    Hii.. what parameters should be changed in context file of oracle apps(R12.1.3) for 250 users and pfile parameters of database

  • LOB RESTRICTION

    I Need to make an insertion using the INSERT command from a text size 50kb. I know that LOB field only accepts 4kb. What should I do to eliminate this limitation? Once again, thanks for the help. null

  • IPod Classic has files, but won't play anything on iPod or in iTunes

    I have a question about iPod/iTunes file structure. I have an 80 gb iPod Classic with about 50 gigs of music and video. I'm not sure what I did, but I can't get the iPod to play, or recognize the data in iTunes. When I plug the iPod in, it registers

  • Cannot play disc

    Hi, I created a project in DVDSP. It builds find and says that formatting was successful. However, when I take it to the DVD player it says, "Cannot play disc." It's funny, b/c it plays on my computer DVD player. During the build, the log said that i