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
EastWind [94]
3 years ago
7

Write a calling statement for the following code segment in Java: public static int sum(int num1, int num2, String name) { int r

esult = num1 + num2; System.out.println("Hi " + name + ", the two numbers you gave me are: " + num1 + " " + num2); return result; } Function Integer sum(Integer num1, Integer num2, String name) Integer result = num1 + num2 Display "Hi " + name + ", the two numbers you gave me are: ", num1, " ", num2 Return result End Function Write a calling statement to the function in Java or Pseudocode. You may use any value of appropriate data samples to demonstrate your understanding.
Computers and Technology
1 answer:
Pachacha [2.7K]3 years ago
3 0

Answer:

Following are the calling of the given question

public static void main(String[] args) // main function

{

int store; // variable declaration

store = sum(32,15,"san"); // Calling of sum()

System.out.println(" TheValue returned by sum() : "+store); // display

}

Explanation:

Following are the description of the above statement

  • Here is the name of function is sum() In the sum() function definition there are 3 parameter in there signature i.e  two "int" type and 1 is "string" type .
  • In the main function we declared the variable store i,e is used for storing the result of sum() it means it storing the result of value that is returning from the definition of sum() function .
  • After that calling the function by there name and passing three parameter under it  sum(32,15,"san"); and store in the "store" variable.
  • Finally print the value by using system.out.println ().
You might be interested in
Why is a salt added to a password that is being stored in a database?
ozzi

The reason why we add salt to a password is to help us mitigate hash table attacks by forcing attackers to re-compute them using the salts for each user.

<h3>What is salt in database?</h3>

A cryptographic salt is composed of random bits that are added to each password instance before its hashing.

Now, Salts usually create unique passwords even in the instance of two users choosing the same passwords. Finally, the importance of adding salts is that they help us mitigate hash table attacks by forcing attackers to re-compute them using the salts for each user.

Read more about database at; brainly.com/question/13262352

#SPJ12

6 0
2 years ago
Two Smallest (20 points). Write a program TwoSmallest.java that takes a set of double command-line arguments and prints the smal
Ivan

Answer:

Written in Java

import java.util.*;

public class Main {

   public static void main(String args[]) {

     int n;

     Scanner input = new Scanner(System.in);

     n = input.nextInt();

     double nums []= new double [n];

     for (int i=0; i<n;i++)

     {

         nums[i] = input.nextDouble();

     }

     

     Arrays.sort(nums);

     System.out.println("The two smallest are: ");

     for (int i=0; i<2;i++)

     {

         System.out.println(nums[i]);

     }

   }

}

Explanation:

This line declares number of input

     int n;

This line calls the Scanner function

     Scanner input = new Scanner(System.in);

This line gets input from user

     n = input.nextInt();

This line declares an array of n elements

     double nums []= new double [n];

The following iteration gets input into the array

     for (int i=0; i<n;i++)

     {

         nums[i] = input.nextDouble();

     }

This line sorts the array

     Arrays.sort(nums);

The following iteration prints the two smallest

     System.out.println("The two smallest are: ");

     for (int i=0; i<2;i++)

     {

         System.out.println(nums[i]);

     }

4 0
3 years ago
Please submit the following assignment prior to Sunday at 11:59 pm. Eastern time: 1. Using a Microsoft Word document, please dis
GenaCL600 [577]

Answer:

Answer explained

Explanation:

United States of America versus Ross Ulbrecht :-

The Fourth Amendment guards against unreasonable searches and seizures by requiring (with limited exceptions) that government agents first obtain a warrant before they go snooping around or confiscating someone’s property. But what exactly does this mean in the modern world of smart phones, wi-fi, and extended Socratic dialogues with Siri? If the New York-based U.S. Court of Appeals for the Second Circuit is to be believed, it means that the government can monitor and collect your internet traffic if this information is merely “likely” to be “relevant” to an ongoing criminal investigation.

That is exactly what happened to Ross Ulbricht, the creator of a website known as “Silk Road,” which enabled users to anonymously buy and sell goods and services. In the course of an investigation into illegal activities associated with the website, the government obtained five “pen/trap” orders authorizing law enforcement to collect IP (internet protocol) addresses for any internet traffic going to or from Ulbricht’s wireless router and other electronic devices. These orders were obtained in lieu of a warrant under a statutory “relevance” standard that falls well short of the Fourth Amendment’s requirement for probable cause.

How could this standard possibly not be constitutionally insufficient? The Second Circuit relied on the “third party doctrine,” ruling that there was no Fourth Amendment issue because users voluntarily conveyed their information to ISPs (internet service providers) and third-party servers, and thus assumed the risk that it would later be turned over without their permission or knowledge. This doctrine, which was developed in the days of pay phones and file cabinets, cannot be fairly extended to online activity given that internet access is—for all intents and purposes—a necessity of modern life for any functioning member of society. Recognizing this simple fact undermines any claim that users have somehow assumed the risk of disclosure to the government, which would have assumed that these users had any real choice in the matter to begin with.

The court also reasoned that because pen/trap devices only reveal IP addresses associated with the user’s online browsing, the collected information doesn’t count as “content” worthy of protection—despite the direct correlation between individual IP addresses and websites, along with the ample information that can be gleaned from knowledge of an individual’s browsing history. The court seemed to conclude that there was no content revealed because an IP address only uncovers the website visited rather than any individual webpage within that site. This superficial approach utterly ignores digital reality.

Finally, the court failed to recognize that the statute authorizing pen/trap data seizure imposes virtually no limits on government attorneys’ discretion. These orders are exceedingly broad in scope and available to nearly any government agency conducting a criminal investigation. Worse still, the court’s role in approving the orders is merely ministerial, with the statute mandating that “the court shall enter an ex parte order authorizing the installation” of these devices.

Because the Second Circuit has stretched both the third-party doctrine and the content/non-content distinction far beyond their logical limitations, Cato—along with the Reason Foundation, Competitive Enterprise Institute, and R Street Institute—has filed an amicus brief asking the Supreme Court to take this case and firmly establish that the internet doesn’t constitute some sort of Constitution-free zone.

5 0
3 years ago
7. Suppose that a RISC machine uses 5 register windows. a. How deep can the procedure calls go before registers must be saved in
Semenov [28]

Answer:

bbbbbbbbbbbbnbbnnnnnnnnnnnnnnnnn

6 0
2 years ago
To open the find and replace dialog box with shortcut keys, hold down ctrl and press ________
ratelena [41]
Hi. To open the find and replace dialog box with shortcut keys, hold down CTRL and press the letter "H". 

Hope this helps.
Take care.
8 0
4 years ago
Other questions:
  • Recursion is memory-intensive because ________. Select one: a. it requires large data values b. it must occur numerous times bef
    11·1 answer
  • Which option allows you to view slides on the full computer screen?
    11·1 answer
  • Assume:
    14·1 answer
  • A user who has special security and access to a system, such as the right to assign passwords, is called a ____.​ a. ​ technical
    8·1 answer
  • can Results shown at the top of the Google search engine results page (SERP) always get high Needs Met ratings
    10·1 answer
  • In computer science, what are two names that are used to describe data structures organized by association
    6·1 answer
  • Which similar computer network components connect multiple devices?
    7·1 answer
  • List and briefly describe the major types of system in organization?​
    15·2 answers
  • How much money did Uta initially invest?$180.00$320.00$352.48$471.70
    14·1 answer
  • Write a C++ line of code to declare a variable of type “double” that signifies the average of student grades, then initialize th
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!