Results 1 to 6 of 6
  1. #1
    Metastar's Avatar
    Metastar is offline Member
    Join Date
    Jul 2010
    Posts
    62
    Rep Power
    0

    Default Need help with StringTokenizer bad

    Hello, I've been trying to figure out stringtokenizer for the past few days and I cannot figure out(and I've tried many many different ways) how to do and where to do my stringtokenizer. I'm going to attach what I have so far just because it will make more sense to see all of the code which I dont want to post all in code tags. The IDE I use is NetBeans as well.

    I have to read a file(below) as is and tokenize it, then put it into a stack by either the A or D that comes at the start. Again I am at wick's end and it's really frustrating me that I can't figure out this simple(or rather what seems to be simple) concept. Please let me know if you figure out anything or can steer me in the right direction, Thanks.


    This is the text file I have to read from:
    Java Code:
    A     Trafalgar   TTTTT     Western_Europe     4     11111     
    D	   France
    D	U.A.E.
    A     Lapland	LLLLL     Northern_Europe    4     22222
    A     Saar     SSSSS     Western_Europe     3     33333
    D	Jordan
    D	India
    A     Yugoslavia  Belgrade  Central_Europe     4     44444
    D     Mongolia
    A	Yemen	Sanaa	    West_Asia       	4    66776
    D     Ireland
    A	Spain       Madrid    Western_Europe     3     33333
    D  Mongolia
    Attached Files Attached Files
    Last edited by Metastar; 10-26-2010 at 09:26 PM.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Please read the link in my signature below about creating an SSCCE. If you make a decent one, it will greatly increase your chances of getting helpful help.

    Best of luck!

  3. #3
    Metastar's Avatar
    Metastar is offline Member
    Join Date
    Jul 2010
    Posts
    62
    Rep Power
    0

    Default

    Unfortunately I don't have the time to make a SSCCE so I guess I'll not be getting help here. :(

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Metastar View Post
    Unfortunately I don't have the time to make a SSCCE
    In order to help you out, we would have to go through your code and create our own SSCCE, so yeah, if you don't have the time to put in this effort, neither do we.


    so I guess I'll not be getting help here.
    That's how I see it too.

    Regardless, best of luck.

  5. #5
    Metastar's Avatar
    Metastar is offline Member
    Join Date
    Jul 2010
    Posts
    62
    Rep Power
    0

    Default

    It's not that I dont want to do it, its just that I'm pushed for time and I don't understand the SSCCE thing. Not trying to not put in effort, just have been stuck on this part for days and its due tomorrow. I and half of my class dont understand it either and those that do aren't helping anyone. If I had more time I'd be more than able to do it.

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Metastar View Post
    It's not that I dont want to do it, its just that I'm pushed for time and I don't understand the SSCCE thing. Not trying to not put in effort, just have been stuck on this part for days and its due tomorrow. I and half of my class dont understand it either and those that do aren't helping anyone. If I had more time I'd be more than able to do it.
    As far as the SSCCE, the link explains it pretty well, but in a nut shell, we're just looking for a very small compilable program that shows your attempt to parse those strings and print out the result on the console with println statements. This way we'd see first hand and understand what you're doing wrong.

    I understand about your time commitments, but most all of us are under even greater time constraints what with our jobs, families, and other commitments, and so as a general rule we expect that the brunt of effort given to solve a problem though needs to come from the person asking for free help including efforts to make it easier for the volunteers here to help them. I'm sure you understand our position.

    Again, best of luck!

Similar Threads

  1. Help regarding StringTokenizer
    By mahesh19nov in forum New To Java
    Replies: 3
    Last Post: 10-26-2010, 10:25 AM
  2. Help with StringTokenizer!
    By ookie833 in forum New To Java
    Replies: 13
    Last Post: 12-14-2008, 05:09 PM
  3. StringTokenizer
    By carderne in forum New To Java
    Replies: 1
    Last Post: 01-26-2008, 09:19 PM
  4. StringTokenizer
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-08-2007, 09:48 AM
  5. StringTokenizer
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-03-2007, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •