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
Which statement describes part of the meeting scheduling process? It is always an all-day event. It is created in a single calen
olga nikolaevna [1]

Answer:

is there a pic or something, sorry i cant help at the time being

Explanation:

5 0
3 years ago
What size font is appropriate for most on-screen presentation slides?
Natali [406]
It's heading 2 or 3, because heading 1 is considerd as too big for slide presentations.
6 0
3 years ago
You have a multi-domain Windows Server 2016 forest. You need to make a shared folder available to users from several domains. Wh
Darina [25.2K]

Answer:

Universal

Explanation:

The active directory has the following group scopes based on the level the group will be granted permission;

Universal

Global

Domain Local

With the Universal group all accounts within the domains located in the network forest can be added as well as Global groups and Universal groups within the same forest can be added. Members in the Universal group can be granted permissions to the resources on any domain located in the forest.

6 0
3 years ago
When working with arrays, most programming languages perform ________, which means they do not allow programs to use invalid sub
Allisa [31]

Answer:

The answer is "Option 2"

Explanation:

In the given question the answer is "array bounds checking", It Checks the limits by providing a way, that Specifies whether a value is inside those limits has been used. It is a variable, that falls into a given class or function called as an array index of array, that's why all option are wrong, that is explained as follows:

  • In option 1, It uses provides security, that's why it is wrong.
  • In option 3, It works on the bits, that's why it is not correct.
  • In option 4, It uses two thing that is "array bound checks and sub-script of bond", that's why it is wrong.

8 0
3 years ago
Which of the following are features of the HTTPS protocol?
gavmur [86]

Answer:

All traffic is encrypted. No one on your network can see what is going on (except for knowing where those packets are going to).

The identity of the remote server can be verified using certificates. So you also know that it really is your bank that you are talking to.

Optionally (and not in wide-spread use), the identity of the client can also be verified using certificates. This would allow for secure login to a site using chip cards instead of (or in addition to) password

8 0
3 years ago
Other questions:
  • Computers store temporary Internet files in the Recycle Bin. These files take up space and slow down a computer. Which tool can
    10·1 answer
  • .true or false? one disadvantage of cloudware is that it is never free<br> A. true<br> B. false
    12·1 answer
  • Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
    13·1 answer
  • anyone here done intro to tech course on edgenuity yet? I failed the first unit test twice and it's prob gonna be a third if i r
    14·2 answers
  • What is the location in the base interface of the link to
    7·1 answer
  • Kesley has been hired to set up a network for a large business with ten employees. Which of the factors below will be
    9·1 answer
  • The steps.txt file contains the number of steps a person has taken each day for a year. There are 365 lines in the file, and eac
    12·1 answer
  • A form of encryption that uses only one key to encrypt and decrypt a file. This is a less
    14·1 answer
  • The cost of a postsecondary education increases with the length of time involved in the program.
    10·1 answer
  • Which of the following scenarios describes an advantage of a global economy?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!