Show the printout of the following code.

public class Test {
public static void main(String[] args) {
double[][] m = {{1, 2, 3}, {1.5, 2.5, 3.5}, {0.1, 0.1, 0.1}};
System.out.println(sum(m));
}

public static double sum(double[][] m) {
double sum = 0;

for (int i = 0; i < m.length; i++)
sum += m[i][i];

return sum;
}
}

A). 3
B). 4
C). 4.0
D). 3.6
E). 3.0

Answers

Answer 1

Answer:

E. 7.0

Explanation:

the 7 of the out of the older and make a shame of waves and force of trying


Related Questions

You have just installed a new sound card in your system, and Windows says the card installed with no errors. When you plug up the speakers and try to play a music CD, you hear no sound. What is the first thing you should do? The second thing?

Answers

Answer:

1. Volume check

2. Manage Device

Explanation:

1. Verify the volume is turned up in Windows and on the speakers. This can be done easily by going to the volume control icon on the computer.

2. Check Device Manager to see if the sound card is recognized and has no errors. This can be done by navigating thus:

My PC (Right click) > Manage > Device manger

Cheers

7. Consider the following code segment: (10pts) pid t pid; pid = fork(); if (pid == 0) { /* child process */ fork(); thread create( . . .); } fork(); (15pts) a.How many unique processes are created? b. How many unique threads are created?

Answers

Answer:

a) 6 processes

b) 2 threads

Explanation:

When you have to make a long-distance call, dialing an unfamiliar area code plus a seven-digit number, you are likely to have trouble retaining the just-looked-up number. This best illustrates the limited capacity of ________ memory.

Answers

Answer:

c. short-term

Explanation:

According to a different source, these are the options that come with this question:

a. long-term

b. implicit

c. short-term

d. explicit

This best illustrates the limited capacity of short-term memory. Short-term memory is the most recent information that a person holds in his head. Usually, this corresponds to events that occurred in the last 30 seconds to the last few days. This type of memory stores recent events, as well as sensory data such as sounds.

You are adding new wires in your building for some new offices. The building has a false ceiling that holds the lights and provides an air path for heating and air conditioning. You would like to run your Ethernet cables in this area.

Answers

Answer:

Plenum rate cable.  

Explanation:

The Plenum rated cable has an unique coating with the low fire resistance and smoke. The main reason to used the Plenum rate cable in the office because it allowing the intense cooling of the  servers also  for the safety purpose we used the Plenum rate cable.  

In the office we used Plenum rate cable wires because The house has a false ceiling housing the lights and supplying air-conditioning and ventilation routes.

Which software product release category is "generally feature complete and supposedly bug free, and ready for use by the community?" Question 19 options: A) Alpha. B) Release candidate. C) Continuous beta. D) Beta.

Answers

Answer:

B) Release candidate

Explanation:

The release candidate is the last stage or final stage of software testing by vendors before it can be officially released to be sold commercially. The release candidate is usually carried out by a very large community of customers.

Some vendors may have to bring out just more than one release candidate if problems are discovered in the first RC.

Release candidate generally feature complete and supposedly bug free, and ready for use by the community.

True or False: Gameplay and level design are unrelated aspects of game development

Answers

Gameplay and level design are unrelated aspects of game development is a FALSE statement.

Explanation:

Level design, or environment design, is a discipline of game development involving creation of video game levels—locales, stages, or missions. This is commonly done using a level editor, a game development software designed for building levels.Level design is a game development discipline that involves the creation of video game levels, locales, missions or stages. This is done using some sort of level editor - software used in game development to construct digital environments. Level design is also known as environment design or game mapping.Gameplay is the specific way in which players interact with a game, and in particular with video games. Gameplay is the pattern defined through the game rules, connection between player and the game, challenges and overcoming them, plot and player's connection with it.Playability is the ease by which the game can be played or the quantity or duration that a game can be played and is a common measure of the quality of gameplay.

You realize your computer has been infected with malware. The program has been copying itself repeatedly, using up resources. What type of malware might you have?

Answers

That type of malware is called a ‘Worm’.

The program has been copying itself repeatedly, using up resources. The type of malware that might have is a worm.

What is malware?

Malware assaults are specific kinds of system attacks that are known to penetrate systems, crack weak passwords, proliferate over networks, and interfere with daily corporate activities.

Malware comes in a variety of forms that can slow down your computer, spam you with adverts, lock up crucial files, and more. Keep in mind that a cyber threat known as malware frequently tries to attack a system on purpose.

Software that is meant to harm the host computer or a network of computers is referred to as "malware," which is a combination of the two words "malicious software."

Therefore, worms are one sort of malware that could be present.

To learn more about malware, refer to the link:
https://brainly.com/question/8544487

#SPJ5

Kamilla is creating a pet adoption website, and is currently learning about her options using the position property.
If Kamilla wants an element to remain in the same location in a browser window, even as the user scrolls through the Web page, she would use the ____ position property.
a. absolute
b. fixed
c. relative
d. float

Answers

Answer:

B. Fixed position property.

When you declare an array, _____________________ You always reserve memory for it in the same statement You might reserve memory for it in the same statement You cannot reserve memory for it in the same statement The ability to reserve memory for it in the same statement depends on the type of the array

Answers

Answer:

the ability to reserve memory for it in the same statement  depends on the type of the array.

Explanation:

When you declare an array, the ability to reserve memory for it in the same statement  depends on the type of the array.

A user complains because the social media apps on his mobile device always note his location. The user is worried about privacy, and would like to keep this information from being broadcast on his social media. Which of the following features should the user adjust in order to accomplish this?

Answers

Answer:

Geotracking

Explanation:

Geotracking is the feature that needs to be adjusted in order to keep this information from being broadcast on his social media.

Given the definition of the function one_year_older:def one_year_older(name, age): print('Name:', name) age = age + 1 print('Your age next year:', age) print()Which of the following statements will invoke the function one_year_older successfully?A. one_year_older(27, 'John')B. one_year_older()C. one_year_older('John', 27)D. one_year_older('John')one_year_older(27)

Answers

Answer:

The answer is "Option C".

Explanation:

Method Definition:

In the given python code, a method "one_year_older" is defined, which accepts two parameters "name and age", in which name accepts string value and age accepts integer value. Inside the method the print method is used, that print name variable value then increments the value of age variable by 1 and print its value, in this question except "Option C"  all were wrong, which can be described as follows:

In option A, In method calling first, it passes integer value, then string value that's why it is wrong. In option B, In this method calling there is no parameter is used. In option D, This type of method calling is illegal.  

The ________ of the operating system enables users to communicate with the computer system. Select one: A. user interface B. modem C. network adapter card D. window

Answers

the user interface of the operating system

Given the definition of the function one_year_older:def one_year_older(name, age): print('Name:', name) age = age + 1 print('Your age next year:', age) print()Which of the following statements will invoke the function one_year_older successfully?A. one_year_older(27, 'John')B. one_year_older()C. one_year_older('John', 27)D. one_year_older('John')one_year_older(27)

Answers

Answer:

C. one_year_older('John', 27)

Explanation:

The correct call to the function one_year_older() is the option C which is one_year_older('John', 27). This is because in the definition of the function, it was defined with two parameters name and age, so when this function is invoked, the argument for name and age must be passed to it in the function call. Hence option C which passes a string John (as the first argument name) and an int 27 (as the second argument age)

A highly agitated client paces the unit and states, "I could buy and sell this place." The client’s mood fluctuates from fits of laughter to outbursts of anger. Which is the most accurate documentation of this client’s behavior?

Answers

Answer:

"Agitated and pacing. Exhibiting grandiosity. Mood labile."

Explanation:

The extremely frustrated user paces that system and remarks that he can purchase and trade this spot. His behavior vacillate through laughing sessions to rage outbursts. So the Pacing and Agitated. Displaying grandiosity. Behavior labile becomes the best reliable documentation of the actions of this corporation

A(n) ____________________ is a hardware device or software utility designed to intercept and prevent unauthorized access to a computer system from an external network.

Answers

Answer:

hardware device

Explanation:

You are trying to build a spreadsheet model to determine what to bid on a construction project. If you are having difficulty constructing the spreadsheet model, what type of chart might you draw to help you set up the model?

Answers

Answer:

Influence

Explanation:

While the user attempts to create a prototype spreadsheet to decide how to offer on such a building plan. Unless he has trouble building the worksheet model, he draws an influence chart to encourage himself to build up the model.

An influencing chart seems to be an understandable graphical representation of a question in judgment. It portrays that elements as modules of different colors and patterns, such as choices, complexities, and targets. It features influences as bullets between them.

Alan is developing a business impact assessment for his organization. He is working with business units to determine the maximum allowable time to recover a particular function. What value is Alan determining? A. Recovery time objective (RTO) B. Recovery point objective (RPO) C. Business recovery requirements D. Technical recovery requirements

Answers

Answer:

A. Recovery time objective (RTO)

Explanation:

The recovery time is defined as the maximum length of time require to recover a system or any network from the failure.

Hence, to determine the recovery time of the function, one can use the RTO.

True or False: Unity can apply multiple textures to a single object or terrain

Answers

This is very true unity is what u said and it is the definition of this

Answer:

True

Explanation:

As a digital strategist, Jared wants to add something extra to his ads to give users more incentive to click and convert. He's considering using the two optional field paths in the URL component of the ad, but needs to be certain his messaging will fit.How many total characters can he use in each of these optional paths?A) Up to 15 characters in eachB) Unlimited number of characters in eachC) Up to 10 characters in eachD) Up to 10 characters in one and 5 in another, for a total of 15

Answers

Answer:

A) Up to 15 characters in each.

Explanation:

Total characters he can use in each of these optional paths are up to 15 characters in each.

A security administrator is testing the security of an AP. The AP is using WPA2. She ran an automated program for several hours and discovered the AP's passphrase. Which of the following methods was she MOST likely using?
A. IV attack
B. Disassociation attack
C. WPS attack
D. Evil twin attack

Answers

Answer:

WPS attack

Explanation:

WiFi protected setup (WPS) is a convenient feature that allows the user to configure a client device against a wireless network by simultaneously pressing a button on both the access point and the client device (the client side “button” is often in software) at the same time. Since it has access to the Access point, it can get the passphrase.

To estimate the percentage of defects in a recent manufacturing​ batch, a quality control manager at Sony selects every 14th music CD that comes off the assembly line starting with the eighth until she obtains a sample of 100 music CDs. What type of sampling is​ used? A. Cluster B. Stratified C. Systematic D. Convenience E. Simple random

Answers

Answer:C. Systematic Sampling

Explanation:

Systematic sampling is a type of probability sampling method in which sample members from a larger population are selected according to a random starting point but with a fixed, periodic interval. This interval, called the sampling interval, is calculated by dividing the population size by the desired sample size.

Systematic sampling involves selecting items from an ordered population using a skip or sampling interval. The use of systematic sampling is more appropriate compared to simple random sampling when a project's budget is tight and requires simplicity in execution and understanding the results of a study.

Which of the following is a disadvantage of using face-to-face communication over other communication channels? A) There is lag time between transmission and reception of the message. B) It is often difficult to schedule a time to meet face-to-face. C) Face-to-face communication reduces your ability to hold the receiver's attention. D) It is more difficult to develop effective relationships with individuals when you use face-to-face communication.

Answers

Answer:

Option B is correct.

Explanation:

The drawback to choosing face-to-face contact across certain platforms of interactions is that it is always impracticable to plan a schedule for face-to-face conversation because mostly the time of both participants should not be the same, sometime the one person wait for the other person or the other person wait for 1st one.

The following problems occur through the internet, the system configuration or the browsers, application configuration. So, the following are the reasons that describe the other options are not appropriate according to the scenario.

The answer choice which is a disadvantage of using face-to-face communication over other communication channels is that:

B) It is often difficult to schedule a time to meet face-to-face.

According to the given question, we are asked to state the answer choice which is a disadvantage of using face-to-face communication over other communication channels.

As a result of this, we can see that when a person is making use of face-to-face communication, then he is taking in real time with the person and the possible disadvantage of this is that it is often difficult to schedule a time to meet face-to-face

Therefore, the correct answer is option B

Read more about face-to-face communication here:

https://brainly.com/question/10002236

What is wrong in the following code? class TempClass { int i; public void TempClass(int j) { int i = j; } } public class C { public static void main(String[] args) { TempClass temp = new TempClass(2); } }

Answers

Answer:

In the given program,  a parameterized constructor declaration is wrong, which can be described as follows:

Explanation:

Code:

class TempClass //defining class TempClass

{

   int i; //defining integer varaible i

   TempClass(int j)//defining parameterized constructor

   {

   i = j; //variable holds a value

   System.out.print(i); //print value

   }

}

public class Main //defining class Main

{

   public static void main(String[] aw) //defining main method

   {

       TempClass temp =new TempClass(2); //creating class Object and call parameterized constructor.

   }

}

Description:

In the given java code, two classes "TempClass and Main" is defined, inside the TempClass class an integer variable "i" and a parameterized constructor is declared, inside the constructor integer variable "i"  hold constructor parameter value, the use print method to prints its value.  Then the main class is defined, inside this main method is declared, in this method, the TempClass object "temp" is defined, that call the parameter constructor.

Which of the main value components are contained in the value proposition "SportsAde offers serious athletes a great-tasting way to stay hydrated during exercise"?

Answers

Answer:

Explanation:unique difference/benefits

- "a great-tasting way to stay hydrated during exercise" this is the benefit statement

2. product/service category or concept is

- the drink

3. target market

- "serious athletes" is the target market

4. offering name or brand is

- SportsAde

Tiffany is writing a program to help manage a bake sale. She writes the following code which prompts the user to enter the total number of items a person is buying and then a loop repeatedly prompts for the cost of each item. She wrote the code but there is a problem: it runs in an infinite loop. How can Tiffany change her code so it doesn't loop forever?

Answers

Answer:

Add the following code after the line 3 that is:

numItems = numItems - 1;

Explanation:

In the following question, some information in the question is missing that is code block.

0 var numItems = promptNum("How many items?");

1 var total = 0;

2 while (numItems > 0){

3 total = total + promptNum("Enter next item price");

4 }

5 console.log("The total is" + total);

In the following scenario, Tiffany is developing a program to help with the handling of bake sales and she not write that part which is essential.

There would become an incorrect condition that requires any increment/decrement operations stating that perhaps the condition variable will be incorrect. Because there has to be the variable "numItems" operation because it engages in the while loop condition.

I'M StartUP Corp. issued and sold 2,500,000 common voting shares during its first public stock sale. What is the minimum number of shares needed to be able to elect a new director to the Board

Answers

Answer:

1,250,000 (1.25 million)

Explanation:

Given

Common Voting Shares = 2,500,000

First, we need to understand what common voting shares is.

Common voting shares are such that the ownership interest in a company and entitle their purchasers to a portion of the profits earned.

To be able to elect a new director to the Board, only ½ or 50% of the total Common voting shares is needed.

i.e.

Minimum number of shares = 50% of 2,500,000

Minimum number of shares = 1,250,000

Hence, the minimum number of shares required to be able to elect a new director to the Board is 1,250,000

A(n) _____ is an interactive information system consisting of hardware, software, data, and models (mathematical and statistical) designed to assist strategy makers in an organization.

Answers

Answer:

decision support system

Explanation:

A decision support system is a set of related computer programs and the data required to assist with analysis and decision-making within an organization.

Cheers

The code snippet below checks whether a given number is a prime number. What will be the result of executing it? public static void main(String[] args) { int j = 2; int result = 0; int number = 0; Scanner reader = new Scanner(System.in); System.out.println("Please enter a number: "); number = reader.nextInt(); while (j <= number / 2) { if (number % j == 0) { result = 1; } j++; } if (result == 1) { System.out.println("Number: " + number + " is Not Prime."); } else { System.out.println("Number: " + number + " is Prime. "); }.A) The code snippet will not compile.
B) The code snippet will display the desired result.
C) The code snippet will display an incorrect result.
D) The code snippet will loop forever.

Answers

Answer:

B) The code snippet will display the desired result.

Explanation:

The code Snippet will give the expected result.

Prime numbers are numbers that are have only two divisors... That is 1 and itself

The while block:    

   while (j <= number / 2) {

           if (number % j == 0) {

               result = 1;

           }

           j++;

       }

ensures that whenever there is a remainder of dividing the variable number by j, then it is not a prime number, since prime numbers are only divisible by 1 and themselves. The result =1 is then tested in an if statement to give the expected output

Final answer:

The code snippet correctly determines if a number is prime and will display the desired result; however, the efficiency could be improved by checking divisors only up to the square root of the number.

Explanation:

The code snippet provided checks whether a given number is prime. The result of executing this code snippet will be B) the code snippet will display the desired result. When the user enters a number, the program will divide that number by all integers from 2 up to the number divided by 2.

If any of these divisions result in a remainder of 0, the result variable is set to 1, indicating that the number is not prime. If none of the divisions have a remainder of 0, the result variable remains at 0, meaning the number is prime.

The only issue with this code is that it will continue checking until number/2 even though we could optimise it by only checking up to the square root of the number (number¹/²). However, this does not affect the accuracy for determining if a number is prime within the range checked.

QUESTION 1 _____ is a type of data encryption that enables users of the Internet to securely and privately exchange data through the use of a pair of keys that is obtained from a trusted authority and shared through that authority. a. Secret key encryption b. A public key infrastructure c. A private key infrastructure d. Open key encryption

Answers

Answer:

The correct answer to the following question will be Option B (Public key infrastructure).

Explanation:

This seems to be a program that allows an individual to deliver an encrypted message or file through some kind of public key that can be unlocked by the intended receiver using another key or code, almost always a private or personal key.

This is a collection of functions, rules, equipment, applications, and methods required to develop, maintain, deliver, utilize, save, and withdraw digital credentials, and handle encryption with the public key.This safeguards against hacking or interference with customer information or data.

Analyze the following code. public class Test { public static void main(String[] args) { double radius; final double PI= 3.15169; double area = radius * radius * PI; System.out.println("Area is " + area); } }

Answers

Answer:

The output of the given code as follows:

Output:

Area is: 12.60676

Explanation:

In the given code some information is missing so, the correct code to this question can be described as follows:

Program:

public class Test //defining class  

{

   public static void main(String[] args)//defining the main method

   {

       double radius= 2; //defining double variable radius

       final double PI= 3.15169; //defining double variable PI

       double area = radius * radius * PI; //defining double variable area that calculates values

       System.out.println("Area is: " + area); //print values

   }  

}

Explanation:

In the given java code a class "Test" is defined, in which a double variable "radius" is defined, which holds a value, that is 2. In the next step, a double constant variable, that is PI is defined, that holds a value, that is "3.15169". Then another double variable area is defined, that calculates the area value, and prints its value.
Other Questions
If the Federal Reserve lowers the discount rate, ceteris paribus (all else being equal), the equilibrium levels of funds lent will __________ and the equilibrium level of real interest rates will ___________. The 80/20 principle holds that 20 percent of all customers generate 80 percent of the demand. Although the percentages usually are not exact, the general idea often holds true. Which consumer market segment is described here?A. Benefit segmentationB. Geographic segmentationC. Market segmentationD. Usage-rate segmentation what outside factor most directly contributed to the formation of enclaves in cities What is Amazon and what can you compare it to in North America? how did industrialization gradually spread to other nations? what device is made of coils of wire with an electrical current passing through it in order to generate a magnetic field Draw a picture that shows 1/4*3 explain in words your picture with connections to the expression MULTIPLE LINEAR REGRESSION What is the model for the multiple linear regression when weight gain is a dependent variable and the explanatory variables are hemoglobin change, tap water consumption, and age. Be sure to define all symbols and model assumptions. A family has a rectangular back yard that measures 5x+4 by 3x-2 they are building a square patio with side lengths that measure x+3. write an expression for the area of grass that will be left in the back yard after the patio is built. show your work. Solve The Expression :-6x + 5 4x < 45 Chose the best plan for each of the following statement:(1) We are known for our operating efficiency and for reducing insurance costs for our customers.(2) The Human Resource Division will reduce the overall cost of fulfilling employment requisitions by eliminating the use of outside recruiting agencies.(3) We will eliminate redundancies throughout the corporation to decrease our overall expenses by 20%.(4) Each human resource employee will use advertisements and personal networking to attract at least 10 qualified applicants per open position.(A) Tactical(B) Mission statement(C) Operational(D) Strategic A pair of children shoes comes in a box that measures 10.2 cm x 15 cm x 8 cm what is the volume of a shoebox A pair of children shoes comes in a box that measures 10.2 cm x 15 cm x 8 cm what is the volume of a shoebox Which factor pushed the United States to go to war against Mexico in 1846?A. arguments in favor of war from Abraham Lincoln and others in CongressB. Manifest Destiny and a desire to extend slavery into Mexican territoryC. an invasion by the Mexican army into the southwestern United StatesD. years of failed negotiations over the disputed Oregon border At a banquet, the ratio of the number of boys to the number of girls is 5 : 3. 20 boys leave and the ratio becomes 5 : 4. How many girls are at the banquet? True or False: The idea that healthcare is a human right, and thus should be available to everyone regardless of ability to pay, aligns with the ideals of market justice. The dropping of the atomic bombs on hiroshima and nagasaki happened on what war? Financial institutions are monitored through which of the following?A. Federal Reserve SystemB. National Banking Union AdministrationC. Federal Deposit Insurance CorporationD National Financial Institution Agency Compute the number of units available for sale in March. 1(b). Compute the number of units in ending inventory on March 31. 2. Compute the cost assigned to ending inventory using specific identification. Note: The March 9 sale consists of 80 units from March 1 purchase and 340 units from the March 5 purchase; the March 29 sale consists of 40 units from the March 18 purchase and 120 units from the March 25 purchase. When you scratch a mosquito bite, you damage some cells. Damaged cells release histamine, which causes localized swelling. The swelling can crush cells, causing them to release more histamine. This is an example of Which of the following equations represents the line with a slope of 5/2 and a y-intercept of 1?y = 5/2x + 1y = 2/5x - 1y = 2/5x + 1y = 5/2x - 1