Which statement below could be used to simulate the outputs of rolling a six-sided die? Suppose randomNumbers is a SecureRandom object.

a. 1 + randomNumbers.nextInt(6);
b. 1 + randomNumbers.nextInt(2);
c. 6 + randomNumbers.nextInt(1);
d. 3 + randomNumbers.nextInt(3);


A

Computer Science & Information Technology

You might also like to view...

This question asks about nesting of if, if-else, switch, while, do-while, and for statements:

a. These constructs may not be nested in at all. b. These constructs may be nested in any way that meets the needs of algorithms the programmer is coding. c. Only control constructs of a given kind may be nested (while loops within while loops; if-else within if-else etc.) d. The question does not make sense in C++.

Computer Science & Information Technology

The TCP/IP Protocol Suite gained popularity because of the wide variety of protocols it provides for various functions, all the way to the Applications Layer.

a. True b. False

Computer Science & Information Technology

Which of the following is NOT a step you should take to prevent attackers from exploiting SQL security holes?

A. limit table access B. use stored procedures C. use standard naming conventions D. place the database server in a DMZ

Computer Science & Information Technology

What is the "sequential processes" concept?

a. There are both many CPU and many PC b. All process is executed in concurrency c. No concurrency inside a process; everything happens sequentially d. None of the other choices

Computer Science & Information Technology