Why can't I get this as an integer

OK this code mostly works.
stations is an arrayList.
On the last line I want to get an integer from my text input.
I want the token to be parsed as an int, so the get() method will find the object that resides there.
I tried but I'm useless :o(
Someone give me a shove in the right direction please.
public void Read()
            try
                FileReader file = new FileReader("test2.txt");
                BufferedReader buff = new BufferedReader(file);
                String line = buff.readLine();               
                Station st;
                StringTokenizer ast = new StringTokenizer(line); 
                    for (int i = 0; i < 4; i++)
                       //create new Stations   
                       stations.add (new Station(ast.nextToken(), null, null, null, null, null, null, null));
// the above piece of code creates the Stations ok
                    for (int i = 0; i < 4; i++){
                         line = buff.readLine();
                         ast = new StringTokenizer(line);
                         for (int j = 0; j < 5; j++){
                              //add new passsengers to Station
                              st = (Station)stations.get(i);
                                     st.addPassenger(new Passenger(ast.nextToken(),(Station)stations.get(??(ast.nextToken()) )  ));
                    }               

I tried:
Integer.parseInt(ast.nextToken())
but when I compile I get :
cannot find symbol method parseint(java.lang.String)

Similar Messages

  • A Playlist idiot. Why can't I get this to work?

    In iTunes I have music Playlists set to shuffle (blue double arrow button) and audio books Playlist set no shuffle. I have been unable to get my iPod to follow these settings. A suggested work around is to use the iPod Settings to set the shuffle function to "songs" when playing music and then switching to “off’ for audio books. There has to be a better way. How do I set the Playlists on my iPod to function the same as it does on iTunes?

    LeftyLucy,
    Using your process are you able to set your iPod to shuffle then listen to the audio book without it shuffling the chapters? I have tried your suggestion with the iPod setting set to shuffle and the chapters shuffled. This is the issue from my original post. I want to listen to music with the shuffle function and listen to audio books (no shuffle) without having to change the settings every time I switch.
    Keep in mind that is not a purchased audio nor a imported book.
    Using a tip from the following post:
    Tom Graves, "A Playlist idiot. Why can't I get this to work?" #11, 05:26pm Sep 28, 2005 CDT
    I have attempted to make the audio book file into an authenticate file but that did not help.

  • What is local storage? Why can't I get this app?

    So I'm trying to get the sims free play app on my ipod4g. It requires 569MB. So I click download and it says I do not have enough local storage. Which I clear do cause I just deleted almost everything off my iPod. I have 1.0GB of free storage left. I don't get it??? Why can't I get the app???

    You do NOT have enough space.  Most apps require 2 or 3 thimes the space required in order to install the app.
    You will need 1.2 - 1.8 gb or so free

  • Why can't I get this extension to show up after I download it, help with code?

    Is there an error in the source code somwhere, here is the url https://addons.mozilla.org/en-US/firefox/addon/wisecampus-1/. I created this extension with the app builder where it generates a zip and you modify it to what you want. I made very little changes, I just would like to have a button on the toolbar that launches the site when clicked. If someone with more experience could take a look at the source code and possibly help me get this up and running it would be greatly appreciated. Thanks all!

    Not really a Firefox user support issue. I am not am add-on developer, but I think I found your problem. ''Can't show the actual css code from that file, this forum software would try to execute it instead of displaying the code.''
    In the '''overlay.css''' file the '''''wcextension-toolbar-button - list-style-image''''' shows the '''''url''''' as http://www.wisecampusbooks.com/images/WC_icon2.jpg . Shouldn't it point to the '''toolbar-button.png''' image in the \chrome\skin\ folder instead?
    I can see the image from that URL when the toolbar button is sitting in the Customize Palette, but the image disappears when the button is moved to a Toolbar. I think that using a web based image in the UI is a security fault, which Firefox is blocking. Something like that could potentially be used to "track" a user or to count how often that button is clicked.
    ''BTW'' the Add-ons support forum is here: <br />
    https://forums.mozilla.org/addons/ <br />
    or you could post here, if you need additional help <br />
    http://forums.mozillazine.org/viewforum.php?f=53&sid=554d097b5d69110d4859bd054051b9b2

  • Installing on Macbook Air 4,2 - why can I not get this done?

    I am trying so desperately to install Arch and dual-boot on my Macbook Air.  I'm not an Arch noob - I promise.  I've installed and loved arch on my old laptop a couple years back but that was not a mac. 
    I've been here but all it says is that this "works out of the box".  Unfortunately, I can't get that far.
    I flashed Archboot to my USB thumb stick using DD and booted into it using ReFind.  I can't remember what the first option was, but I believe it was Arch-something with EFI.  I chose that and I got an error message: 
    Failed to open file:  boot\intel-ucode.img
    Trying to load files to higher address
    Failed to open file: boot\intel-ucode.img
    So, I chose the second option which says (I'm sorry, I'm in my OSX right now so I'mg telling this from memory) something like Arch-something without EFI.  Then I got to the actual install console.  I created some partitions using cgdisk and chose my packages but they all failed to install due to a dependency missing.  I'm really sorry I don't know what that error was.  After I post this I will go back and try again and see if I Can get a screen shot.
    Anyhow - This is nothing like my install was on my old PC laptop and I feel like I'm not even sure if I'm going down the right path.  Does anyone know of a youtube video which shows this process?  Honestly, as much as I've used Arch in the past, I truly feel like a dumbass right now but I'm willing to risk my reputation for a rig that runs the sweetest Linux there is.
    Thanks -
    Whatever you need, logs, etc... no problem - but tell me where to get them because I'm not sure how to with my system in limbo like this.

    Alright, only problem is that the beginner's guide talks about entering things at a prompt - like "# sgdisk --zap-all /dev/sda".  i'm not at a prompt.  I'm in the GUI Archboot console.  Also, I don't see instructions on which partitions to create, what size to make them, etc..  and, I still don't know why the original option in Archboot failed - the one that prompted me that it could not find boot/intel-ucode/img.  It's not that I haven't read the documentation and it's also not that I'm too stupid to figure it out - I feel like I'm on the wrong track. For example, the Beginner's Guide doesn't even mention instructions for Archboot - which is what I'm using.  By the way, thank you for your response.  I don't want to sound ungrateful
    Last edited by burgertime (2014-12-21 02:08:22)

  • Why can't I get this website to load properly?

    www.wzzm13.com A local news website.
    I can access it with Internet explorer, or my android tablet with no problem.
    I cannot access it with Firefox, (32) or Nightly (64) and I have removed both, wiped out everything to do with them, reinstalled them with NO ad-ons, and still the problem exists.
    Basically the problem is, I can get to the website, but I cannot click on any of the news articles. They will NOT work. The articles are "pop up" screens. I have the pop up blocker turned off. All advertisement blockers turned off.. and yet something in fire fox is still blocking this website from loading properly.
    Fire fox 3.1 (latest version) same with Nightly. I HATE having to use explorer.
    Anyone have any idea? Ive tried everything listed here. Clearing cashe, cookies, everything.. still the problem exists ONLY for fire fox.
    Thanks.

    Boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.
    *http://www.bleepingcomputer.com/tutorials/how-to-start-windows-in-safe-mode/

  • Why can I not get this table data into Excel?

    I want to use Excel to analyse some data from the local newspaper.  The table of figures looks like this:
    I've used the 'print' function from the online newspaper to create the pdfs, then run OCR.  I can highlight the text and copy/paste it into a text document without any trouble, but I'd really like to have the data keep its columnar format.  When I highlight a part of the table then use the right-click menu to 'save as table' or 'copy as table' or 'Open data in spreadsheet', nothing happens.  What am I doing wrong?

    I would suggest you to try Acrobat XI once. The export quality with Acrobat XI is remarkably improved than it's predecessors.
    You can download the trial version from http://www.adobe.com/cfusion/tdrc/index.cfm?product=acrobat_pro&loc=us

  • HT5622 Why can't I get this app to download?

    It said it downloaded but the app never popped up on my phone, I go to the app on the apple store and it says play. I click the play button and nothing happens, can anyone tell me how I can get the app onto my iPhone?

    Hi Hunterb96,
    Welcome to the Support Communities!
    Is it possible that the app has been placed on one of your six Home screens?
    Does the app appear in a spotlight search?
    If not, you can download it again.
    The links below will provide some guidance:
    iOS: Understanding Spotlight Search
    http://support.apple.com/kb/ht3636
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/HT2519
    Cheers,
    Judy

  • Why can't I get this for iPhone, you don't do much for iphones

    Why isnt firefox desktop available for iPhone. ???

    Unfortunately Apple does not allow Firefox onto the iPhone. While there may be something in the future, right now there isn't a Firefox for iOS. [[Will Firefox work on my mobile device?]]

  • HT4009 I have a Ipad Mini and want to load Slotomania.  It will not let me do this. I currently have that game on my IPod Touch and my daughter has Slotomania on her IPad Mini.  Why can't I load this game on MY IPad Mini???????

    I have Slotomania on my IPod Touch and my daughter has Slotomania on her IPad Mini.  Why can't I get this game on my Mini??

    What happens when you try to install it?
    What happens when you try to redownload it directly to the iPad by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • WHY can't Apple get their Java to work with Homestead SiteBuilder??!! Please someone work this out :(

    WHY can't Apple get their Java to work with Homestead SiteBuilder??!! Please someone work this out  

    Is Java enabled in Safari / Preferences - Security?
    Try the SiteBuilder help center.
    Perhaps using a different browser may help.
    Try Firefox or Chrome.
    Mozilla Firefox Web Browser — Free Download
    Google Chrome - The web is what you make of it

  • When ordering a project I'm getting a message " an error occurred while contacting the Apple online store. Please try again"  Can anyone please tell me why I might be getting this message and how to fix the problem.  Thank you

    When ordering a project I'm getting a message " an error occurred while contacting the Apple online store. Please try again"  Can anyone please tell me why I might be getting this message and how to fix the problem.  Thank you

    I've got the same problem.
    It wasn't the case before the upgrade to v 9.2 (Iphoto 11) yesterday.
    The previous solution preferences - advanced - "select a store" (last option) doesn't solve it anymore.
    Thanks!

  • HT1657 My download keeps freezing, and I have to buy it over and over again and it wastes money. I have now rented my movie 4 times and it still won't finish downloading. Why can't I get the rental for free if it keeps doing this?

    MY DOWNLOAD KEEPS FREEZING AND I HAVE TO KEEP BUYING IT OVER AND OVER AGAIN. IT'S WASTING MY MONEY. I HAVE NOW RENTED MY MOVIE 4 TIMES AND IT STILL WON'T FINISH DOWNLOADING. WHY CAN'T I GET THE RENTAL FOR FREE IF IT KEEPS DOING THIS? CAN YOU PLEASE HELP? THANK YOU.

    Please turn off your caps lock.  All caps indicates shouting, is considered rude and is difficult to read.  Many will not read such posts.
    If it doesn't finish downloading then just click Store>Check For Available Downloads
    There is no need to keep re-buying it.

  • TS1717 This article is vague and unhelpful. My iTunes needs help from a pro. I have over 120,000 songs -- NO movies, TV, radio, or books... I have other programs which efficiently run things which are not audio-based. So why can I not get iTunes working w

    This article is vague and unhelpful. My iTunes needs help from a pro.
    I have over 120,000 songs -- NO movies, TV, radio, or books...
    I have other programs which efficiently run things which are not audio-based.
    So why can I not get iTunes working well?? It now takes at least 10 secs for any operation to be completed!
    That is just plain evil. But I am sure I could do something to help.
    All the music is on an 2T external drive.

    TS1717 as noted in the thread title...
    Brigancook, is the library database on the external or just the media? iTunes reevaluates smart playlists and rewrites its database after every action on the library. I've found this can make a library half that size, with a lot of smart playlists, quite sluggish. That said I'm aware part of my problem is aging hardware. Having the database on the internal drive may improve performance if it is currently on the external.
    I'd expect to see an exponential relationship between size and response time which may explain what you see. Cutting down on the number of smart playlists might help. If we're really lucky the long awaited iTunes 11 might have streamlined some of the background processes as well as cleaning up the front end.
    tt2

  • Why can't I get in-app purchases , i get the follow message : please contant itunes to complete this transaction

    Why can't I get in-app purchases

    Do as it instructs: Contact iTunes Support:
    How to contact an iTunes Advisor
    Go to https://getsupport.apple.com
    (If you see a message that says 'There are no products registered to this Apple ID, simply click on 'See all products and services')
    Choose 'iTunes', then 'iTunes Store'.
    A new page will open.
    Choose 'Purchases, Billing & Redemption', then 'Apple ID account billing'.
    Fill out the 'Please tell us more about the issue' box.
    Click the blue 'Continue' button.
    Choose your country.
    Select the contact option that suits your needs best.

Maybe you are looking for

  • Help me on PO Header of ME21N

    hi frnds, i need to add one custom field (total qty)in me21n header. for this i used enhancement MM06E005. in this i have added a field in include tables CI_EKKODB and in screen exist SAPMM06E # 0101. now this field is coming on me21n. now my require

  • Are pictures still in Organizer available after a disk crash?

    I have pictures that show in Organizer but the file they were on was located on a disk that crashed and the data wasn't recoverable. Is there anyway to save the pictures in Organizer to a new file? Thanks so much, Rick

  • Network problem and spinning ball

    Hi all, I am having a problem with my MacBook black since I updated to Lion (10.7.1). A weird problem causing the whole system to be unresponsive (Finder not responding), showing the spinning ball forever. After some time, I suspected Safari, and I r

  • CS5 export problem with Shakey/Jumpy titles

    looks ok fully rendered in adobe premier XS5 but after i export it into an avi the titles are all jumpy/shakey.  Any ideas? I saw the same problem was posted and never answered last year so i know im not the only one. PS- does everybody here use the

  • BEx login issue  - RFC_ERROR_COMMUNICATION

    Hi Friends...When I am trying to log on to BW  using the connect icon in BEx, I am getting an error message: RFC_ERROR_COMMUNICATION SAP_CMINIT3 : rc=20 > Connect to SAP gateway failed Connect_PM  GWHOST=10.220.152.104, GWSERV=3301, SYSNR=01 LOCATION