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
astraxan [27]
3 years ago
8

Please write a Java program.

Computers and Technology
1 answer:
Marianna [84]3 years ago
5 0

Answer:

public class Main

{

public static void main(String[] args) {

 int[] arr = {3, 1, 1, 2, 4, 4, 4, 6};

 

 int[] o = countOccurance(arr);

 for (int x: o)

     System.out.print(x + " ");

}

public static int[] countOccurance(int[] arr){

    int[] occ = new int[6];

    for (int x: arr)

        occ[x-1]++;

   

    return occ;

}

}

Explanation:

Create a function called countOccurance that takes one parameter, an array

Inside the function, initialize an array, occ, to hold the occurance counts

Create a for each loop to iterate the array, and increment the occurance of the numbers

When the loop is done, return the occ array

Inside the main, initialize an array

Call the function countOccurance and set it to a new array, o

Print the elements of the o to see the number of occurances of the numbers

You might be interested in
What kind of Encryption is this:
VMariaS [17]

The Encryption of a website

4 0
3 years ago
Your son is complaining that his smartphone is broken. He tells you that he cannot connect to the internet, nor can he make or r
ycow [4]

Answer:

the correct and only reasonable answer is option B

3 0
2 years ago
The variables within the class all are related to help describe the object.
lawyer [7]
This does not make sense
3 0
3 years ago
A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.Which
vichka [17]

Answer:

The answer woul be B

Explanation:

Cloud computing, often called simply "the cloud," is the delivery of on-demand computing services, all from applications to data centers, through the Internet on a pay-per-use basis.

Flexible resources: scale quickly and easily, horizontally and vertically, to meet demand

Measured service so you only pay for what you use

Self-service: all the IT resources you need with self-service access

Software as a service (SaaS)

* Cloud-based applications, or software as a service, run on distant computers "in the cloud" that are owned by others and operated by others, and that connect to users' computers through the Internet and, Usually a web browser.

A private cloud is an infrastructure that is operated exclusively by a single organization, either managed internally or by a third party, and is hosted internally or externally. Private clouds can take advantage of cloud efficiencies, while offering greater control of resources and avoiding multi-tenancy.

Key aspects of the private cloud

A self-service interface that controls services, allowing IT staff to provide, allocate and distribute IT resources on demand.

Highly automated management of resource pools for everything from computing capacity to storage, analytics and middleware

Sophisticated security and control projected for specific company requirements

* Public clouds belong and are managed by companies that offer quick access to computer resources accessible through a public network. With public cloud services, users do not need to acquire hardware, software or support infrastructure, as they belong and are managed by providers.

6 0
3 years ago
Read 2 more answers
What is the biggest difference between technical communication and the other kinds of writing you have done?
lukranit [14]

Answer:

 The main difference between the technical communication and the other different kinds of communication is that as follow:

  • In technical communication, the data or information must be specific and to the point. On the other hand, in general communication there is no such boundary for the conversation.
  • The content of the technical conversation should be in proper and systematic format and in general communication there is no such formatting required.
  • The technical communication always focus on the audience and main purpose of the conversation as compared to general communication.

3 0
3 years ago
Other questions:
  • What does DKIM stand for?
    9·2 answers
  • What are five most important areas of the animal industry that involve science and technology?
    14·1 answer
  • What is 1/10 of 2.0 in decimal form​
    10·1 answer
  • To determine the average of a range of numbers, click the ____ in the formula bar, then click average.
    13·1 answer
  • A collection of realated files is called a
    12·1 answer
  • Display the total number of parking tickets.
    5·1 answer
  • Similarities between inline css and internal css​
    6·1 answer
  • Write a function called mul_time that takes a Time_Elapsed object and a number and returns a new Time_Elapsed object that contai
    13·1 answer
  • Describe the specific job you would want to have if you were going to pursue a career in digital music or video.
    13·1 answer
  • Which digital cellular standard is used widely throughout the world except the united states?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!