CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Sep 2011
    Posts
    197

    [RESOLVED] I am confused..

    I am trying this:

    Code:
     try(BufferedReader br = new BufferedReader(new FileReader("T.txt")); BufferedWriter bw = new 
    
    BufferedWriter(new FileWriter("T.txt"))) {  
                    read = br.readLine();
                    ArrayList ara = new ArrayList();
                 do {
                            br.readLine();
                      ara.add(read);
                             }while(br.hasRemaining());
    Error:

    Code:
    Test2.java:70: error: cannot find symbol
                             }while(br.hasRemaining());
                                      ^
      symbol:   method hasRemaining()
      location: variable br of type BufferedReader
    1 error
    complete!
    Press any key to continue . . .
    What am I doing wrong I've even imported the Buffer API package. I would really appriciate a nice apt explaination of what exactly the "." operator does. Because, I don't fully understand it. Or if you can explain it here. *edit* I suppose I understand that br.hasRemaining doesn't work, because bufferedReader doesn't have a hasRemaining method. I would still like a nice explainatoin of the "." operator.
    Last edited by kolt007; October 13th, 2011 at 06:11 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
  •  





Click Here to Expand Forum to Full Width

Featured