• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

on calling methods..  RSS feed

 
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...
 
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

 
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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!