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
Ivanshal [37]
4 years ago
8

The code calculates and prints the sum of all the elements in the array a.

Computers and Technology
1 answer:
Rufina [12.5K]4 years ago
7 0

Answer:

public class sum{

    public static void main(String []args){

       int sum = 0;

       

       int[] a = {9,2,8,4,0,6};

       

       for ( int i = 0; i < a.length; i++ )

       

       {

       

           sum = sum + a[i];    

       

       }

       System.out.println("The sum is: "+sum );

   }

}

Explanation:

First create the class in java programming.

Then create the main function and declare the variable and array.

To calculate the sum of all element in array, first we have to traverse the array pick element one by one and then add,

so, we have to use loop for traversing and add with sum which inialize with zero.

suppose array element is 1,2,3,4

sum = sum +a[1]  means sum = 0 +1=1

the sum = 1+2=3, sum = 3+4=7.

and then finally print the result store in sum.

You might be interested in
In what year did alienware introduce alienfx lighting zones into their pc's?
ser-zykov [4K]
The answer to the question asked  above is 2006. 
<span>Alienware introduce alienfx lighting zones into their pc's on 2006.</span>

Hope my answer would be a great help for you.    If you have more questions feel free to ask here at Brainly.
8 0
3 years ago
A is a way for students to keep track of information during research
Ilya [14]
The choices are a) credible website B)search log c) Boolean operator d) online database.

The answer is, d. Online database. There are already numerous online digital tools that can aid research. Examples are readcube, mendeley, google scholar. It helps you save and organize researches as well as automatically give bibliographies according to your need like APA and MLA. These tools can hold and save different information that researchers need.
6 0
3 years ago
How could the company benefit by applying Agile principles?
Tcecarenko [31]

Answer:

When Agile is truly implemented in a project team, it empowers them with unparalleled flexibility. Teams work in smaller bursts and are supplemented by the constant feedback and involvement of the product owner. In other project management methodologies, changes usually are time-consuming and costly

6 0
3 years ago
Read 2 more answers
Which of the following examples illustrates the Crowding Out Effect?
maks197457 [2]

your answer is c to what your looking for



6 0
3 years ago
A service provider recently upgraded one of the storage clusters that houses non-confidential data for clients. The storage prov
VARVARA [1.3K]

Answer:

<em>C. Purging</em>

<em></em>

Explanation:

<em>Data Purging in computer storage is a process that permanently erases and remove data from a storage space</em>.  Data deleting only removes the shortcut to the data but does not remove the data permanently, and can be easily recovered by an expert. <em>Data purging removes data permanently and also frees up the storage or memory space for other uses.</em> Data purging is relatively inexpensive and can be achieved with some special software tool.

Since the storage provider wants the hard drive back in working condition, data purging is the best option.

3 0
3 years ago
Other questions:
  • Which kind of software allows users to draw pictures, shapes, and other graphical images with various on-screen tools such as a
    14·1 answer
  • Identify which of these types of sampling is​ used: random,​ systematic, convenience,​ stratified, or cluster. To determine her
    13·1 answer
  • What was the technology that defined each of the four generations of computers?
    12·1 answer
  • Write a program "addnumbers.c" where it takes as many arguments as the user includes as command line arguments and calculates th
    11·1 answer
  • Define global variables called highestNum, userInput and sumOfNums and initialize them. In Main call 2 methods: 1) UserData() 2)
    5·1 answer
  • A sum amounts to ₹2400 at 15% simple interest per annum after 4 years fond the sum.​
    9·1 answer
  • Which of the following is not a data visualization technique?
    6·1 answer
  • 1. Describe how research and development influence design. Cite specific examples of how research and development influence desi
    11·1 answer
  • Explain basic anatomy of computers.
    13·2 answers
  • Is each of the following method identifiers (a) legal and conventional, (b) legal but unconventional, or (C) illegal?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!