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
Annette [7]
4 years ago
8

Write a method named printOdd() that accepts an integer array as argument and print all the odd numbers in the array. You may as

sume all the numbers in the array are greater than 0. (Hint: Odd number is any integer that CANNOT be divided exactly by 2). This method should have the following header.
Computers and Technology
1 answer:
Hoochie [10]4 years ago
8 0

Answer & Explanation:

//written in java

public class Main {

   private static void printOdd(int[] list) {

       for (int value : list) {

           if (value % 2 == 1) {

               System.out.println(value);

           }

       }

   }

   public static void main(String[] args) {

       printOdd(new int[]{5, 6, 2, 3, 11, 4, 7});

   }

}

You might be interested in
What is the best resource to learn python?
7nadin3 [17]

Answer:

prolly a snake expert

Explanation:

they know snakes

4 0
3 years ago
Read 2 more answers
What does getfenv() do?
mariarad [96]

Answer: getfenv() is a type of function. Particually a envirotment function. for a lua coding.

Explanation: What this does it goes thourgh  line of code in a particular order.

This means. getfenv is used to get the current environment of a function. It returns a table of all the things that function has access to. You can also set the environment of a function to another environment.

Forgot to include examples of where this could be used. Although not very common uses, there are some. In the past Script Builders used getfenv to get the environment of a script, and setfenv to set the environment of a created script’s environment to a fake environment, so they couldn’t affect the real one. They could also inject custom global functions.

Not entirely sure if this uses getfenv or setfenv, but the use in Crazyman32’s AeroGameFramework is making the environment of each module have access to other modules without having to require them, and having access to remotes without having to directly reference them.

5 0
3 years ago
Read 2 more answers
Savings accounts _____.
klemol [59]
???????????????????????
7 0
3 years ago
Which of the following is an example of a runtime error?
Rina8888 [55]

Answer:

missing quotation marks around a string literal

6 0
3 years ago
What do you mean by algorithm​
Snowcat [4.5K]

A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Q3** Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 let
    15·1 answer
  • To keep your emails concise and to the point
    13·1 answer
  • You can display content variations to mobile, tablet or desktop users.
    12·1 answer
  • Which of the following economic systems leaves production decisions completely up to the producers?
    15·2 answers
  • In file hashing, a file is read by a special algorithm that uses the value of the bits in the file to compute a single number ca
    13·1 answer
  • A user complains that his new mouse doesn't work right. He has an old system at home and when he has had this problem, he cleane
    11·2 answers
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
  • Which clauses in the Software Engineering Code of Ethics are upheld by a whistleblower (check all that apply). "Respect confiden
    15·1 answer
  • Which of these words is used to begin a conditional statement?<br> when<br> input<br> if<br> until
    8·1 answer
  • How do we ensure that future technologies are fair to society?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!