subject

The divBySum method is intended to return the sum ofall the elements in the int arrayparameter arr that are divisible by the intparameter num. Consider the following examples, in whichthe array arrcontains {4, 1, 3, 6, 2, 9}.The call divBySum(arr, 3) will return 18,which is the sum of 3, 6, and 9,since those are the only integers in arr that aredivisible by 3.The call divBySum(arr, 5) will return 0,since none of the integers in arr are divisibleby 5.Complete the divBySum method using anenhanced for loop. Assume that arr isproperly declared and initialized. The method must use anenhanced for loop to earn full credit./** Returns the sum of all integers inarr that are divisible by num* Precondition: num > 0*/public static int divBySum(int[] arr, int num)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 04:10
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
question
Computers and Technology, 24.06.2019 18:00
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
question
Computers and Technology, 24.06.2019 20:30
⭐️⭐️⭐️ what network is larger in size? man or wan? you ⭐️⭐️⭐️
Answers: 2
You know the right answer?
The divBySum method is intended to return the sum ofall the elements in the int arrayparameter arr t...
Questions
question
Mathematics, 02.08.2019 19:00
Questions on the website: 13722360