Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Do i need to import anything here?

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Do i need to import anything here?

    hi again, i have found this code online and when i use it says next to process: "cannot find symbol"
    do i need to import anything to make it work?
    try {
        BufferedReader in = new BufferedReader(new FileReader("array"));
        String str;
        while ((str = in.readLine()) != null) {
            process(str);
        }
        in.close();
    } catch (IOException e) {
    }

    thanks in advance =]


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Do i need to import anything here?

    import java.io.*;

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Do i need to import anything here?

    yer i have done that but process is still underlined. the help box comes up with:

    cannot find symbol
    symbol: method process(java.lang.String)
    location: class Main

  4. #4
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Do i need to import anything here?

    Process is most likely a method that the person who wrote that code wrote, in which case you can either write it yourself or try to see if they put that code somewhere else.

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Do i need to import anything here?

    oh ok thanks, i just got the impression it was set but hey i'll take another look!
    thanks again for th help!! =]

Similar Threads

  1. Pb import Eclipse Java Yaps Petstore
    By azerty@123450 in forum Java IDEs
    Replies: 1
    Last Post: May 4th, 2010, 09:16 PM
  2. Simple import problem
    By Mekster in forum Java IDEs
    Replies: 3
    Last Post: November 13th, 2009, 09:17 PM
  3. Problem in import com. in eclipse
    By java_cs in forum What's Wrong With My Code?
    Replies: 6
    Last Post: September 11th, 2009, 07:26 AM
  4. How to import an .tiff image in JSP?
    By jazz2k8 in forum JavaServer Pages: JSP & JSTL
    Replies: 4
    Last Post: May 12th, 2008, 05:55 AM