Results 1 to 2 of 2
  1. #1
    VinceGuad is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

    Question Question: BufferReader/StringTokenizer

    Do these two work together somehow?

    Here's what I need to accomplish:

    I need to read a text file
    Tokenize it
    Sort it using three different sorting methods.



    Im thinking you use Buffer Reader to read the text file then create 3 string tokenizer objects say

    Java Code:
    BufferedReader br = new BufferedReader(new FileReader("C:\\ScienceMagazineArticle.txt"));
    
    StringTokenizer s1 = new StringTokenizer("ScienceMagazineArticle.txt"); 
    // is this the location of where the text file goes?
    
    StringTokenizer s2 = new StringTokenizer("ScienceMagazineArticle.txt"); 
    
    StringTokenizer s3 = new StringTokenizer("ScienceMagazineArticle.txt"); 
    
    //Then I could use these string tokenizer objects i have created to sort using three different algorithms correct?
    
    s1.bubbleSort();
    s2.insertionSort();
    s3.selectionSort();
    I am still hazy here, can someone help?

  2. #2
    VinceGuad is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

    Default

    I have already created the sorting algorithms in another .java file.

Similar Threads

  1. StringTokenizer in a Palindrome program
    By jeremyk in forum New To Java
    Replies: 10
    Last Post: 02-13-2010, 06:35 PM
  2. Help with StringTokenizer!
    By ookie833 in forum New To Java
    Replies: 13
    Last Post: 12-14-2008, 04:09 PM
  3. StringTokenizer
    By carderne in forum New To Java
    Replies: 1
    Last Post: 01-26-2008, 08:19 PM
  4. StringTokenizer
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-08-2007, 08:48 AM
  5. StringTokenizer
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-03-2007, 09: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
  •