Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

on calling methods..

 
marc perry batuigas
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's me again... er, still got a question to ask bout my last program, this time it concerns calling methods...well in my program (MyLinkedList), i used bufferedreader to read the text file, then put it again on StrongTokenizer to read each character of the text file, in a line...assuming i have already initialized the linkedlist into my main and bufferedReader has read the file, and stringTokenizer is reading a line, i want to call, say, remove, how do i call the methods while still in the stringTokenizer?
really need some answers guys, this is my 2nd year as BSIT, and i'm doing my best to love java...and MyLinkedList is just one of the three of my school projects. hope to hear from someone soon...
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the code you have so far. Be sure to use the code button to create code tags so your indentation is preserved.
 
marc perry batuigas
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about creating an instance of your MyLinkedList in the main-method?
Than you could use this instance, and add, remove, ...
And I would suggest moving the main-method to a separate class, since your List shouldn't be bundled to a specific usage of it.
[ May 08, 2004: Message edited by: Stefan Wagner ]
 
marc perry batuigas
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got the solution already guyz...LOLz
this forum really helped me alot...hope u continue to help others too sa u did for me...thanks a million and more POWER!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic