1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sunny_sXe [5.5K]
3 years ago
14

Pass the two arrays to a method that will display the integer value(s), if any, that appear in both arrays (note that the two ar

rays can have no stored values in common). Save the file as ArrayMethodDemo.java.
Computers and Technology
1 answer:
vampirchik [111]3 years ago
5 0

Answer:

The solution code is written in Java

  1.    public static void checkCommonValues(int arr1[], int arr2[]){
  2.        if(arr1.length < arr2.length){
  3.            for(int i = 0; i < arr1.length; i++){
  4.                for(int j = 0; j < arr2.length; j++){
  5.                    if(arr1[i] == arr2[j]){
  6.                        System.out.print(arr1[i] + " ");
  7.                    }
  8.                }
  9.            }
  10.        }
  11.        else{
  12.            for(int i = 0; i < arr2.length; i++){
  13.                for(int j = 0; j < arr1.length; j++){
  14.                    if(arr2[i] == arr1[j]){
  15.                        System.out.print(arr2[i] + " ");
  16.                    }
  17.                }
  18.            }
  19.        }
  20.    }

Explanation:

The key idea of this method is to repeated get a value from the shorter array to check against the all the values from a longer array. If any comparison result in True, the program shall display the integer.

Based on this idea, an if-else condition is defined (Line 2). Outer loop will traverse through the shorter array (Line 3, 12) and the inner loop will traverse the longer array (Line 4, 13). Within the inner loop, there is another if condition to check if the current value is equal to any value in the longer array, if so, print the common value (Line 5-7, 14-16).

You might be interested in
Nj hj hjkbh hj g7yubuyiycrtdryfrrcctcftt
Dafna1 [17]

Answer:

nice letters

Explanation:

6 0
3 years ago
Read 2 more answers
Convert 30 to hexadecimal ​
Delvig [45]

Answer:

1E

Explanation:

Here is a table to help you. Similar to a multipication table, just follow either the number 3 down to A (aka 10) or 6 x 5 and you will find your answer of

1E = 30

6 0
3 years ago
Video Fundamentals
Tresset [83]

Answer:

1) a link, original, a pointer.

2) The media browser can help you by providing the very quick accessibility to all of your assets like iTunes songs, your movies in the movie folder, and this makes your file browsing experience simple while you edit the files.

You can leave the browser open as well as docked quite in the same manner as the other panel.

3) You need to display the Voice-over Record button. Now select your track in the timeline where you want to add the voice-over.

Now you need to go to the Timeline, and click on the Settings button, and finally select the Customize Audio Header.

Now you will see the Button Editor dialog box appearing, and now you need to drag and drop the microphone button to the required audio track, and finally, you need to click on OK.

4) While you are importing the audio or video to the Premiere Pro, it computes versions of such files, which it can readily use for quicker performance. And these are being termed as the Media cache files. And they are being saved in the Media cache files folder.

Explanation:

Please check the answer.

6 0
3 years ago
An electronic cover letter should be
Lunna [17]
A cover letter is a document sent with your resume to provide additional details about you. The cover letter is what introduces your resume and you. 
<span>A few short tips for writing cover letters. i dont know if thats the answer you looking for</span>
3 0
3 years ago
Read 2 more answers
Given the char * variables name1, name2, and name3, write a fragment of code that assigns the largest value to the variable max
Assoli18 [71]

Answer:

The following code as follows:

Code:

max=name1;   //define variable max that holds name1 variable value.

if (strcmp(name2, max)>0)  //if block.

{

   max=name2;  //assign value to max.

}

if (strcmp(name3,max)>0)   //if block.

{

  max=name3; //assign value to max.

}

Explanation:

In the above code, we define a variable that is max. The data type of max variable is the same as variables "name1, name2, and name3" that is "char". In the max variable, we assign the value of the name1 variable and use if block statement two times. In if block, we use strcmp() function that can be defined as:

  • In first if block we pass two variables in strcmp() function that is "name2 and max" that compare string value. If the name2 variable is greater then max variable value so, the max variable value is change by name2 variable that is "max=name2".
  • In second if block we pass two variables in strcmp() function that is "name3 and max" that compare string value. If the name3 variable is greater then max variable value so, the max variable value is change by name3 variable that is "max=name3".

4 0
3 years ago
Other questions:
  • Which of the following is NOT a group on the Slide Master tab?
    6·1 answer
  • Which of the following would a high school graduate interested in the performing arts most likely do after graduation?
    10·1 answer
  • Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. The company's pr
    10·1 answer
  • Name similarities between innovation and invention
    6·1 answer
  • Which is a requirement for searching for a template
    14·1 answer
  • Which domain indicates that a website is sponsored by a university or college?
    12·1 answer
  • Please help me ASAP! Here is the question.
    15·1 answer
  • What type of app is Drake designing? Drake is designing a mobile app for an online travel blog. The app will enable browsers to
    5·1 answer
  • What is the suffix of hollow?
    7·1 answer
  • ________ is the art of manipulating people into breaking normal security procedures or divulging confidential information.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!