Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7822421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:55:14+00:00 2026-06-02T07:55:14+00:00

I have this ArrayList – ArrayList<Object[]> tree … I also have this Array –

  • 0

I have this ArrayList – ArrayList<Object[]> tree…

I also have this Array – Object[] move…that has a size of 2.

In my program a unique 2D array is added to move[0] and an integer to move[1]. This array is then added to the ArrayList then the process is repeated so I have a list of ‘moves’.

My problem is I am unsure how to find the arrays (‘moves’) within the ArrayList (‘tree’) that contain a certain value in the move[1] element only – as the move[0] element will be unique everytime.

I then want to make an array/list of all of the matches. For example, an array that contains all of the move[0] values that match up to the move[1] value of 3. So I would be left with an array/list of 2D arrays that contain the required moves.

Thanks,
Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:55:15+00:00Added an answer on June 2, 2026 at 7:55 am

    It seems to me that what you need is a key-value data structure and you have chosen a rather odd way to implement it.
    You should use either a HashTable if you can not use generics (you are in an old jdk for some reason) or use a HashMap using types to enforce type safety.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have array defined like this : ArrayList<String> items = new ArrayList<String>(); I have
I have this array: ArrayList<Problem> problems = new ArrayList <Problem>( 100 ); then I
I have java API which return this type: ArrayList[ArrayList[String]] = Foo.someJavaMethod() In scala program,
I have a array list like this: private ArrayList<Locations> Artist_Result = new ArrayList<Location>(); This
I have this situation Session session = sessionFactory.openSession(); ArrayList<String> city; // in city array
Hi I have an arrayList which has some objects.also my objects has two fields
i have this arraylist and i want to put the data in array.but i
i have a ArrayList with ObjectArrays like this: ArrayList<Object[]> objectList = new ArrayList<Object[]>(); i
How to display parameters of an arraylist into a listview I have this array
Say I have a generic array like this: ArrayList<Fruit> fruits = new ArrayList<Fruit>(); Then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.