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
NemiM [27]
3 years ago
11

g what does the following piece of code do a) Print the duplicate elements in the array b) Print the element with maximum freque

ncy c) Print the unique elements in the array d) None of the mentioned
Computers and Technology
1 answer:
goldenfox [79]3 years ago
8 0

Answer:

a) Print the duplicate elements in the array

Explanation:

I found this code:

This is two for cycle, where we make a comparison among two variables i and j to print duplicate elements.

for (int i=0; i < arr.length-1; i++)

{

for (int j = i+1; j < arr.length; j++)

 {

   if (( arr[i].equals(arr[j])) && (i != j))

       {

         System.out.println(arr[i])

}

}

}

You might be interested in
Crash proof cars... do you have any idea on how to improve this idea
AURORKA [14]
The suspense and reaction time of the car . So for example if a car pulled out suddenly and was about to hit you, you could make the car so it functionally knows how to react
7 0
3 years ago
Read 2 more answers
1. A green traffic sign means
NeX [460]

Answer:

general regulatory and speed control.

7 0
3 years ago
What is a computer ?it types​
Keith_Richards [23]
Um can you be more descriptive
8 0
3 years ago
Read 2 more answers
When you move into a new home or apartment, the first thing on your checklist should be to have the ____________ changed. (5 Let
Lynna [10]

Answer:

When you move into a new home or apartment, the first thing on your checklist should be to have the <u>locks</u> changed

Explanation:

Changing the locks

Given that the way the previous owners of the new home or apartment made use of the locks and the keys are usually not completely known to the new owners, one may never know all those that have a key or a means to gain access into the apartment or home. Therefore, in order to guarantee proper security, it is a good practice to have as one of the first thing on the checklist, the changing of the locks of the entrance doors and windows of the new home or apartment.

5 0
2 years ago
David needs to create a password. He uses "rtjjkliusfvwr." Which of the following best explains the weakness in his password?
Darina [25.2K]
I would say because it is hard to remember. Unless each one of those stands for a world, kind of like an acronym, then good luck remembering it!
3 0
3 years ago
Read 2 more answers
Other questions:
  • As it relates to confidentiality, data may be classified in three ways. Match each data classification below to its definition.
    9·1 answer
  • What is connectivism and how does it apply to online learning?
    7·1 answer
  • Write a function similar to keep_ints like before, but now it takes in a number n and returns a function that has one parameter
    8·1 answer
  • Anicius boethius invented a system that made possible the memorization and written transmission of melodies.
    9·1 answer
  • What specific type of tools can assist teams by identifying attacks and indicators of compromise by collecting, aggregating, and
    8·1 answer
  • Level of comfort that people feel
    10·1 answer
  • Please help me ASAP
    6·1 answer
  • A technician has been asked to upgrade a processor and needs to do some research. The computer is just a couple of years old. Wh
    13·1 answer
  • Point out the wrong statement:
    7·1 answer
  • Question 1
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!