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
Crank
4 years ago
9

In order to generate a random number, you must use Math.random( ). Group of answer choices True False

Computers and Technology
1 answer:
Tanzania [10]4 years ago
5 0

Answer:

False

Explanation:

While Math.random() can be used to generate a random number, Java programming language also has a class called Random in the java.util package which can be imported into your code. This is a more efficient way of generating random numbers (ints or doubles) as you can instantiate several random number generators. The following line of code creates an an object of the class Random and sets the bound to 10.

Random rand = new Random (10);

This will generate random number from 0-9.

You might be interested in
1) These are operators that add and subtract one from their operands.
adoni [48]

Answer:

1) B (++ and --)

2) A (1 2 3 4 5)

Explanation:

In the first question, the operators ++ and -- are used in almost all programming languages for adding  and subtracting  1 respectively from an operand.

In the second question using a while statement the numbers 1-5 is printed out because the variable n=1 is increased by 1 after each iteration.

7 0
3 years ago
Write a method named printOdd() that accepts an integer array as argument and print all the odd numbers in the array. You may as
Hoochie [10]

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});

   }

}

8 0
4 years ago
Testing a website includes visiting every web page on the site and selecting every link, tab, and button available.
mixas84 [53]

Answer:

Wouldn't it be false?

Explanation:

because what if the website doesn't allow some kinds of people on certain pages?

(If its wrong then sorry.)

4 0
2 years ago
Write a program that assigns a value the value of 50000 to an integer variable x, assigns the value of x*x to an integer variabl
Allushta [10]

Answer:

Explanation:

The following code is written in Java and does exactly what the question asks. The variables are long variables instead of integers because integer variables can only be a maximum of 2147483647 and the product of these two variables is much higher than that.

public static void main(String args[]) {

               long x = 50000;

               long y = x * x;

               System.out.println(y);

       }

7 0
3 years ago
Which type of network is created when you use encrypted tunnels between a computer or a remote network and a private network thr
Deffense [45]
<span>Virtual private network (VPN) is the answer</span>
3 0
4 years ago
Other questions:
  • Legal counsel has notified the information security manager of a legal matter that will require the preservation of electronic r
    8·1 answer
  • What are two parts of a cell reference?
    7·1 answer
  • Which of the following would help a photographer keep from dropping a camera? - - Rain hood
    6·2 answers
  • A lead views a specific page on your website, say, your case study page. You then send targeted follow-up content like one of yo
    14·1 answer
  • Which of the following statements about the break statement is false? Group of answer choices Common uses of the break statement
    12·1 answer
  • i need to also do a algorithm where if the total is a even number 10 points are added to the score and if the total is odd then
    11·1 answer
  • Jane is a full-time student on a somewhat limited budget, taking online classes, and she loves to play the latest video games. S
    14·1 answer
  • Which line defines a valid CSS rule?
    6·2 answers
  • Which of these describes a database? Check all of the boxes that apply.
    15·1 answer
  • What is folded card publishing?​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!