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 4 of 4

Thread: So where to begin.

  1. #1
    Junior Member
    Join Date
    Nov 2023
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default So where to begin.

    Good afternoon all,

    I'm new to Java and to be honest I learn more by diving in the deep end and getting stuck in.

    With that said, I have a project in mind

    A program to do the following.

    1, Go to a user specified directory
    2, Make a list of all folders in the parent directory and store the directorys list in a string array.
    3, Go to a second user specified directory
    4, Make a list of all the folders in the parent directory and store the directorys list in a second string array
    5, Compare the two arrays and output the lines that have identical content.

    Example output

    Array 1
    A
    B
    C

    Array 2
    A
    D
    E

    Output
    A

    Where would be the best place to start with something like this?

    Kind regards,

    Yoda

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: So where to begin.

    Where would be the best place to start
    write a method that is given the path to a directory and have that method create the list of the directories in that directory
    and return the list. The File class has methods that will be useful.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Nov 2023
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: So where to begin.

    Quote Originally Posted by Norm View Post
    write a method that is given the path to a directory and have that method create the list of the directories in that directory
    and return the list. The File class has methods that will be useful.
    Thanks Norm,

    Can you recommend any reading material that talks about how to implement this, I find it difficult to think of search keywords to do a forum search.

    ATB

    Yoda

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: So where to begin.

    These two links from Oracle may help:
    http://docs.oracle.com/javase/tutori...ybigindex.html
    https://docs.oracle.com/javase/8/docs/api/

    Save those links.

    Otherwise use a Search engine to find code examples.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Where to begin?
    By MrLowBot in forum What's Wrong With My Code?
    Replies: 22
    Last Post: December 23rd, 2018, 12:32 PM
  2. Where do I begin?
    By Coherent in forum The Cafe
    Replies: 9
    Last Post: September 22nd, 2014, 07:36 AM
  3. Where do I begin?
    By Coherent in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 30th, 2014, 05:45 AM
  4. Where do I begin?
    By Coherent in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: June 30th, 2014, 05:05 AM