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
drek231 [11]
3 years ago
14

Java

Computers and Technology
1 answer:
VARVARA [1.3K]3 years ago
5 0

Answer:

Here are the two statements which use nextInt() to print two random integers between 0 and 9:

System.out.println(randGen.nextInt(10));

System.out.println(randGen.nextInt(10));

Explanation:

Here is the complete program:

import java.util.Scanner;   //to accept input from user

import java.util.Random;   // use to generate random numbers

public class DiceRoll {  //class definition

public static void main (String [] args)  {//start of main function  

Random randGen = new Random();   // creates a Random class object randGen

int seedVal = 0;   //sets starting point for generating random numbers

randGen.setSeed(seedVal);   //sets the seed of random number generator

System.out.println(randGen.nextInt(10));  //generates and prints the first random integer between 0 and 9 (10 is the range from 0 to 9) using nextInt method, which is used to get next random integer value from the sequence of random number generator

System.out.println(randGen.nextInt(10));   //generates and prints the second random integer between 0 and 9 (10 is the range from 0 to 9) using nextInt method

return;    }  }

Another way to write this is to initialize two int variables:

int integer1;

int integer2;

Now use two print statements to print these random integers between 0 and 9 as:

System.out.println(integer1= randGen.nextInt(10));

System.out.println(integer1= randGen.nextInt(10));

Another way to write this is:

Set the value of integer1 to a random number from 0 to 9 and same for integer2

int  integer1 = randGen.nextInt(10);

int  integer2 = randGen.nextInt(10);  

Now use two print statements to print these random integers between 0 and 9 as:  

System.out.println(integer1);

System.out.println(integer2);

You might be interested in
Interpretations of​ Moore's law assert​ that:
jonny [76]

Answer:

Option (D) is the correct answer of this question.

Explanation:

Moore's Law relates to Moore's theory that the number of transistors on a microchip doubles every two years while device costs are halved.

Interpretations  of Moore's law assert the computing power doubles every 18 months.The Moore's Law theory states that development is exponential.Moore's Law states that every couple of years we should expect our computers to increase their speed and capacity and we'll pay less for them.h

Option(A),Option(B) ,Option(c) and option(E) do not belongs to Moore's law  so these options are incorrect options.

5 0
3 years ago
_____ refer(s) to computer programs that provide instructions for a computer to execute a desired task. Answer .a.Software .b. I
Dmitriy789 [7]
Software, which contains coded information that is almost like instructions for your computer.
8 0
3 years ago
You want to discard your old computer and want to securely erase the data from your hard drive. What can you use to do this and
qwelly [4]
Go here this should help bunches!
http://www.microsoft.com/security/online-privacy/safely-dispose-computers-and-devices.aspx
Hope this website helps!
5 0
3 years ago
How can you protect your information when using wireless technology
Mnenie [13.5K]

Answer: Avoid using non-Bluetooth-paired or unencrypted wireless computer peripherals.

Explanation:

8 0
2 years ago
Your company has a team of remote workers that need to use Windows-based software to develop company applications, but your team
timofeeve [1]

Operating systems are the software that supports the basic functioning of the computer. Windows Virtual Desktop is an Azure compute service that will help solve the problem.

<h3>What is Windows Virtual Desktop?</h3>

Windows Virtual Desktop is an app virtualization service of Azure that operates on the cloud platform. It includes standard operating procedures that can be used by users with multiple OS.

Azure's Virtual Desktop supports different versions of window OS. This type of system is majorly used in remote work demands and specialized workloads.

Therefore, Windows Virtual Desktop is an Azure compute service.

Learn more about Azures service here:

brainly.com/question/13144160

#SPJ1

5 0
1 year ago
Other questions:
  • After configuring a static IP address on a desktop computer, the technician finds that he cannot communicate with other devices
    10·1 answer
  • Python: Write a program that generates 8 random scores (between 0 and 100), store them in an array,
    8·1 answer
  • The most complex part of ssl is the ___________ protocol.
    7·2 answers
  • The ____ command displays the last 10 lines of a text file.
    5·1 answer
  • Why is a class called a factory of objects
    11·1 answer
  • Which are among the ways you can use bitlocker encryption? (choose all that apply?
    5·1 answer
  • Where can you find your EFC
    8·2 answers
  • + Use for loop to print numbers from 100 to 10
    11·1 answer
  • The use of technology to observe a user's actions often without the user's knowledge is known as:
    11·1 answer
  • What type of databases is not limited by the data’s physical location?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!