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
svp [43]
3 years ago
14

Unit 6: Lesson 2 - Coding Activity 1 AP Computer science

Computers and Technology
1 answer:
sladkih [1.3K]3 years ago
8 0

The complete program is to define a boolean method that returns true if all elements of an array are negative, or return false, if otherwise

The method in java, where comments are used to explain each line is as follows:

//This defines the method

public static boolean chkNegative (double[] myArr) {

   //This initializes a boolean variable

   boolean isNeg = true;

   //This iterates through the array

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

     //If the array element is 0 or positive

     if (myArr[i] >= 0) {

         //Then the boolean variable is set to false

       isNeg = false;

       //And the loop is exited

       break;

     }

   }

   //This returns true or false

   return isNeg;

 }

Read more about boolean methods at:

brainly.com/question/18318709

You might be interested in
What is the advertising photographer’s main objective in creating an image?
iren2701 [21]
B. To sell it as a product
8 0
3 years ago
I am a you tuber that does videos on the rob lox myth community, I have over 250+ subscribers. I was wondering if any of y'all w
Marina86 [1]

Answer:

I will for sure subscribe!!!!

Explanation:

:)

7 0
3 years ago
Where can i check on an acer chromebook to see what version of java is installed.
lana66690 [7]

Based on the current situation, to check on an Acer Chromebook to see what version of java is installed, you must "<u>input</u><u> specific commands on the terminal window and press Enter key</u>."

<h3>Java Installation on Chromebook.</h3>

Currently, Góogle or Chromebook do not allow Java installation on its operating system. This is due to the security threats that are associated with Java.

However, there are ways to bypass this situation and eventually install Java on your Chromebook if you so desire.

Nevertheless, if eventually, you installed Java successfully on your Chromebook, to check the version, you must "<u>input specific commands on the terminal window and press Enter key."</u>

Learn more about Java Program here: brainly.com/question/19485769

5 0
2 years ago
Why are peripherals added to computers?
Novay_Z [31]

Answer:

To expand their capabilities

Explanation:

They allow users to do more with computers

7 0
3 years ago
Q) Look at the code and determine the output
lutik1710 [3]

Answer:

B.

Explanation:

6 0
2 years ago
Other questions:
  • A(n) combines video instruction and interaction with an instructor and students in an online classroom.
    9·1 answer
  • Which of the following is not an important consideration before a business invests in a particular technology?
    12·1 answer
  • . Which game was the most popular free download in Apple®’s app store by January 2014, despite poor reviews and plagiarism accus
    14·2 answers
  • What qualifies as a dependent (a) 25 year old son/daughter making$5k per year living at home, (b) 21 year old friend going to sc
    10·1 answer
  • create a 3 to 5 step plan for checking out a post on social media for the next time you encounter something questionable.
    11·2 answers
  • You're familiar with the story of Hansel and Gretel, so when you decide to go exploring you always make sure to keep track of wh
    14·1 answer
  • Selet the correct answer.
    11·2 answers
  • You can run a macro by:
    10·1 answer
  • If you could pick xbox or playstation what would you pick?And why :)?
    11·2 answers
  • Becca is working on a program that will store data. The program will need quick access to data and data persistence is not impor
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!