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
bogdanovich [222]
3 years ago
7

HW3_P2 - MyString

Computers and Technology
1 answer:
pentagon [3]3 years ago
3 0

ou agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark JLLKK04TU3P

You might be interested in
A function defined beginning with void SetNegativesToZeros(int userValues[], ... should modify userValues such that any negative
Stels [109]

Answer:

   public static void setNegativesToZero(int userValues[]){

       System.out.println("Array before setting negatives to zero "+Arrays.toString(userValues));

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

           if(userValues[i]< 1){

               userValues[i] = 0;

           }

       }

       System.out.println();

       System.out.println("Array After setting negatives to zero "+Arrays.toString(userValues));

   }

Explanation:

Using Java programming Language, the method is created to receive an array of ints as parameter (as specified in the question)

Using a for loop, we iterate over the entire array checking for values that are negative (<0) and setting them to zero.

See a complete program below

import java.util.Arrays;

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

   // Create an array and assign values

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

   //Calling the method setNegativesToZero

   setNegativesToZero(arr);

   }

//Creating the Method

   public static void setNegativesToZero(int userValues[]){

       System.out.println("Array before setting negatives to zero "+Arrays.toString(userValues));

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

           if(userValues[i]< 1){

               userValues[i] = 0;

           }

       }

       System.out.println();

       System.out.println("Array After setting negatives to zero "+Arrays.toString(userValues));

   }

}

3 0
3 years ago
When summarizing graphs of categorical​ data, report the​ _______ and describe the​ _______?
Alex_Xolod [135]
Hello <span>Rouahidy7821 
</span><span>

Answer: When summarizing graphs of categorical​ data, report the​ models and describe the​ </span><span>variability. 
</span>
Hope this helps
-Chris
7 0
3 years ago
What does it mean to calculate frequencies within a dataset?
WITCHER [35]

Answer:

to count the number of cases that fall into different subgroups within a dataset.

Explanation:

To calculate the frequency within the dataset means to count the number of times that item or condition on which we are checking the column within the dataset is true or the frequency of the case that is coming into different subgroups.

Hence the answer of this question is third option given in the question.

8 0
3 years ago
What's the difference between pseudo code and natural language​
ArbitrLikvidat [17]

Answer: While algorithms are generally written in a natural language or plain English language, pseudocode is written in a format that is similar to the structure of a high-level programming language. Program on the other hand allows us to write a code in a particular programming language.

8 0
3 years ago
Read 2 more answers
For Subtotals to be useful and accurate, it is important that the data be ________ correctly.
Naddika [18.5K]

Answer:

The correct answer is letter "D": sorted.

Explanation:

In <em>Microsoft Office Excel</em>, subtotals are used to add numerical values from a list of data. Before applying a subtotal, the information must be sorted according to what is intended to be entered. This is the first step and one of the most important so the outcome of the subtotal will reflect correct and accurate information.

8 0
3 years ago
Other questions:
  • In the year of our Lord 66, the Emperor Nero, being at that time in the twenty-ninth year of his life and the thirteenth of his
    10·1 answer
  • What does the int size = sizeof buffer / sizeof * buffer means ?
    7·1 answer
  • You are most likely to use<br> images for photos or digital paintings.
    6·1 answer
  • Which of the following types of cloud platforms would a webmail service offered to the general public be considered?
    9·1 answer
  • An ISP is considering adding additional redundant connections to its network. Which of
    5·1 answer
  • Monica spent a lot of time preparing for her interview, but the hiring manager is not asking any of the questions she practiced.
    9·2 answers
  • Pls Help need it before 1pm PLS.
    15·2 answers
  • What is a technological advancement that is now being used in tractors throughout America?
    6·2 answers
  • What are the steps to creating a blank database? Use the drop-down menus to complete them.
    9·1 answer
  • Write a class called Dragon. A Dragon should have a name, a level, and a boolean variable, canBreatheFire, indicating whether or
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!