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 8556969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:28:10+00:00 2026-06-11T15:28:10+00:00

I read that you can pass an array as a parameter to a method

  • 0

I read that you can pass an array as a parameter to a method but is it recommended?
What i mean is, is there any other way of doing it that would be more accepted?

In my case, i have 2 classes that each contains an array and i need to check if both of them are the same or are different. So i thought of creating a method in one of the class that would take an array in parameter and then compare every value of the two arrays.

I am not sure if Arrays.equals(): works since it’s an object array and not just numbers.

I found this Java Array Comparison but it seems to be more complicated than what i need to do.

  • 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-11T15:28:11+00:00Added an answer on June 11, 2026 at 3:28 pm

    1) yes that’s OK to pass arrays as parameters, there is absolutely no problem in doing so

    2) Arrays.equals(Object[] a, Object[] b) can check Object arrays (you must be sure that you have the appropriate equals method on your object if you don’t want to simply test instance identity). Note that the existence of this method is the proof of 1 😉

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

Sidebar

Related Questions

I've read that there is no way that JQuery can download a file directly,
Is there any tool that can read a WSDL file and based on the
I have read that you can do it, but would this really improve performance
I like the new Dynamic keyword and read that it can be used as
I'm building a plugin system for my application. I've read that anyone can decomple
I'm trying to find a library that can read a given RSS/Atom feed, and
To my surprise and delight I read that an adminsitrator can import (nearly directly)
I'm looking for an editor that can read and write remote PHP files via
I am trying to write a small Mac command line app that can read
I am using Liferay 6 . I have read that Liferay Hooks can be

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.