CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2011
    Posts
    197

    Creating an array *help*

    I am having trouble creating an array.


    Code:
    String[] read2;
           read2 = new read2[br];
    Error:

    Code:
    Test2.java:53: error: cannot find symbol
           read2 = new read2[br];
                       ^
      symbol:   class read2
      location: class Test2
    Test2.java:53: error: cannot find symbol
           read2 = new read2[br];
                             ^
      symbol:   variable br
      location: class Test2
    Last edited by kolt007; October 12th, 2011 at 04:39 PM.

  2. #2
    Join Date
    Sep 2011
    Location
    philadelphia
    Posts
    2

    Re: Creating an array *help*

    Is that read2 a class?

    if it is, make sure that the class must be in a same folder with the one where u r creating an array, or you can import the read2 class.

  3. #3
    Join Date
    Sep 2011
    Posts
    197

    Re: Creating an array *help*

    It's not a class.

  4. #4
    Join Date
    Aug 2011
    Location
    West Yorkshire, U.K.
    Posts
    54

    Re: Creating an array *help*

    Are you trying to create an array initialised with the string "br" in it ???

    Code:
    String[] read2;
    read2 = new String[] {"br"};
    or
    Code:
    String[] read2 = new String[] {"br"};
    [code]

  5. #5
    Join Date
    Sep 2011
    Posts
    197

    Re: Creating an array *help*

    nevermind I think what I was trying is impossible I was trying to put,

    BufferedReader br = new... etc

    into an array.

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