Looking at the code below, what are the possible values that could be generated? (Assume Random has been imported with a new Random object).

int randomInt = rand.nextInt(2);
randomInt = randomInt + 1;
System.out.print(randomInt);

Answers

Answer 1

Answer:

1 or 2

Explanation:

rand.nextInt(2) generats a number between 0 and 2 ( not including 2). randomInt = randomInt + 1 adds 1 to that number.


Related Questions

How many fnaf games did Scott Cawthon make?

Answers

Answer:

8 but he is making FNaF security breach

Explanation:

there is FNaF VR help wanted

Answer:

8 or 10

Explanation:

What is closed soruce nonproprietary hardware and software based on publicly known standards that allow third parties to create

Answers

Answer:

open system

Explanation:

An open system is a system that sets open-source standards and promotes the interoperability and portability standards between systems developing and running open-source programs.

An open-source application is a program in which its source code is readily available and free for public use and upgrade. Unlike closed-source, its users can add or update the features of the source code.

Write a method that reverses the sequence of elements in an array. For example, if you call the method with the array 1, 4, 9, 16, 9, 7, 4, 9, 11, then the array is changed to 11, 9, 4, 7, 9, 16, 9, 4, 1. Use one or more loops in your solution (do not use the Array Reverse method).

Answers

Answer:

The method written in Java is as follows:

   public static void ArrayReverse(int myarray[]){

       for(int index = myarray.length-1; index>=0;index--)

           System.out.print(myarray[index]+" ");

}

Explanation:

This line defines the method

   public static void ArrayReverse(int myarray[]){

This line iterates through the array from highest to least index

       for(int index = myarray.length-1; index>=0;index--)

This prints the array elements in reverse

           System.out.print(myarray[index]+" ");

}

To call the method from the main, use the following:

ArrayReverse(myarr);

However, myarr must be declared and populated as an integer array before the method is called

See attachment for illustration of the complete program (the main and the array reverse method)

Insert the missing code in the following code fragment. This fragment is intended to implement a method to set the value stored in an instance variable.
Public class Employee
{
Private String empID;
Private boolean hourly;
) . .
_______
{
Hourly = isHourly;
}
}
A) public void setHourly(String isHourly)
B) public void getHourly()
C) public boolean getHourly()
D) public boolean setHourly(boolean isHourly)

Answers

Answer:

A)

Explanation:

In this code example the missing piece of code would be...

public void setHourly(String isHourly)

This piece of code is creating a function called setHourly which takes in one String variable as it's parameter. Based on the rest of the code, the function takes that parameter variable and places it into an instance variable called Hourly which can be used when the function is called.

In order to be an effective employee who knows recent information on loans and laws, in what topic should your information be current?

regional trends

industry politics

regional politics

industry trends

Answers

Answer:

industry politics

Explanation:

In order to be an effective employee who knows recent information on loans and laws, your information should be current in industry politics.

This ultimately implies that, an employee who wants to be well-informed and knowledgeable on recent informations on loans and laws, is saddled with the responsibility of gathering and sourcing for informations through industry politics. Thus, the employee must have been involved in working with various industry leaders and most likely to have interacted with various employees working there.

Industry politics can be defined as a group of policies, standards and regulations set by the government to promote and facilitate competitiveness among the private and publicly owned industries.

Answer:

industry politics

Explanation:

the other person is first and correct mark him brainliest!

What is the information that oranges contain vitamin C considered?

Answers

Answer:

Nutritional Information or Nutritional facts.

Explanation:

They are on most foods, on medicines it's called Drug Facts, and on vitamins it's called Supplementary facts!

Using direct mapping, consider a 16-bit memory addresses, and a cache with 64 blocks, where each block is 8 bytes. What is the size of offset, block, and tag

Answers

Answer:

Tag          Block             Offset

 7               6                   3

Explanation:

Using direct mapping hashing:

Memory address size = 16 bits

Number of cache blocks = 64

Size of each block = 8 bytes

Thus;

Offest field = size of each block = 2^{3} = 3 bits

Number of blocks = 64 = 2

Thus, the index field is = 2^{6} = 6 bits of block

Tag filed is of size = 16 - (3+6) = 7 bits of tag

What single awk command can be used to display all the login names and their associated numerical user IDs

Answers

Answer:

Used the command syntax; awk -F":" '{ print "username: " $<number location> "\t\tuid:" $<number location> }' <target folder>

Explanation:

Linux operating system is a fast open-source computer platform for programmers and network administrators. Its system is arranged in a hierarchical tree structure with the root represented as "/" (for absolute path).

The passwd is a folder in the Linux OS that holds the login details of all users in the system network. The 'awk' is one of the commands used to get information from a file in a folder. It prints out the result by specifying the location of the values (like the username and user id) as a variable (with prefix '$') and then the target folder.

A short circuit can cause _______ because there is nothing in the circuit to limit the current and absorb the electrical energy. Heat builds up quickly in the wire and power supply.

Answers

Answer:

Fire

Explanation:

You'll get a giant spark. The electricity will flow freely causing over-heating or fire.

A backup can be installed that costs​ $100. What is the minimum allowable reliability for the backup that would make installing it​ worthwhile? The minimum allowable reliabilit​ = nothing​%

Answers

Answer:

0.95

Explanation:

Reliability is a assurance that a machine would have an efficiency of one or close to one.

The minimum allowable reliability R;

(1 - R) x 2000 = 100

Make R the subject of the formula;

R = 1 - (100/ 2000)

R = 1 - 0.05

= 0.95

The inFS.open(str) function has a string parameter str that specifies the _____ of the file to open.

Answers

Answer:

str represents the name of the file to open

Explanation:

Required:

What does str represents in the above syntax

Before the inFS function can be used to access or read or write into a file, the file name has to be specified.

This could be done in any of the following ways:

1. inFS.open("abc.txt")

2. str = "abc.txt"; inFS.open(str);

In (1), the file name is specified directly into the function

While in (2), the filename is passed into a string variable which is then further passed to the inFS function.

In the case of this question, method 2 is used and the str represents the name of the file

You are configuring a firewall to use NAT. In the configuration, you map a private IP address directly to a persistent public IP address. What form of NAT is being used?
A. Registered NAT.B. Static NAT.C. Dynamic NAT.D. Advanced NAT.

Answers

Answer:

Option B (Static NAT) would be the correct choice.

Explanation:

Static NAT seems to be a method of NAT methodology used to navigate as well as monitor internet usage from some kind of specific public IP address to something like a private IP address. Everything always allows the provision of web access to technology, repositories including network equipment inside a protected LAN with an unauthorized IP address.

Some other decisions made aren't relevant to the situation in question. So the above alternative is indeed the right one.

1) Write a statement that defines an array of four integers named miles. The array should be initialized with the values 1, 5, 9, and 22.
2) Write a statement that defines an array of string objects nameddirections. The array should be implicitly sized, with an initialization list containing the values "Up", "Down", "Left", and "Right.

Answers

Answer:

Explanation:

The following code statements are written in Java and are simple one line statements that can be into any Java code or function. The first code statement creates a simple integer array with 4 predefined values initialized.

1) int[] miles = {1,5,9,22};

The second code statement creates a simple String array with four-string objects in it.

2) String[] nameddirections = {"Up", "Down", "Left","Right"};

pls help will give brainlest​

Answers

Answer:

C

Explanation:

Answer:using a louder voice

Source:trust me bro

high level languages are closer to machine language than humans yes or no​

Answers

they are closer to human languages and further from machine so, no.

Answer:

yes

Explanation:

because they were built from humans

Which item is essential to know before sketching a navigation menu flowchart?
template specifics, such as horizontal or vertical menu layout
whether or not the site will implement a search feature
all of the pages in the site and the content each page will contain
who will be using the site and the design theme selected for them

Answers

Answer:

A, template specifics, such as horizontal or vertical menu layout

Explanation:

Answer:

D. who will be using the site and the design theme selected for them

Explanation:

I am doing the exam right now.

A part-time job performed while in high school must have the approval of your school counselor.
False
True

Answers

Answer:

False, it only needs approval of your parents/guardian

May I have brainliest please? :)

Answer:

False

Explanation:

how does a digital computer process data?

as a string of binary digits called bits
as number written in the decimal number system
as a sequence of instructions given by a programmer
as a software program generated by the computer

Answers

Answer:

as a string of binary digits called bits

Malware is a combination of which two words? A. malevolent and software B. malignant and software C. maladapted and software D. malicious and software Answer: ________

Answers

Answer:

D. Malicious and software

While your hands are on home row, both of your thumbs are on _____.

Answers

Answer:

While your hands are on home row, both of your thumbs are on Space-barI know this will definitely help✍️✍️✍️

ong answer, but make sure to provi
you
reasoning
Sales Company:
W.D. Widgets is a small company that sells widgets. They're mostly made up of salespeople who work with lots of clients.
You've taken over as the sole IT person for this company of 80-100 people.
R teils you to provision a machine for a new employee, you order the hardware directly from a business vendor.
You keep one or two machines in stock, in case of emergency. The users receive a username that you generate for them.
You then give them an orientation on how to login when they start. You currently manage all of your machines using
Windows Active Directory. The company uses only Windows computers. When a new computer is provisioned, you have
to nistallots of sales-specific applications manually onto every machine. This takes a few hours of your time for each
15
machine. When someone has an IT-related request, they email you directly to help them.
Almost all software is kept in-house, meaning that you're responsible for the email server, local machine software, and
instant messenger. None of the company's services are kept on the cloud.
Customer data is stored on a single file server. When a new salesperson starts, you also map this file server onto their
local machine, so that they can access it like a directory. Whoever creates a folder on this server owns that folder and
everything in it. There are no backups to this critical customer data. If a user deletes something, it may be lost for
everyone.

Answers

Answer:

Umm just go what your gut tells you to do

Explanation:

If a function is called more than once in a program, the values stored in the function's local variables do not _________ between function calls. g

Answers

Answer:

persist

Explanation:

Calling a function Within a program, can be regarded to as specifying of the name of the function when it is within a statement or it could be by the function itself, it possible for a particular function to call another function, in a case wherby a function returns a value, assignment or using the value to variable is not necessary. It should be noted that If a function is called more than once in a program, the values stored in the function's local variables do not persist between function calls

The ____ represents units of work application software performs in terms of its demand for low-level hardware services.

Answers

Answer:

application demand model

Explanation:

Which feature is being used when connecting a device to the network using an electrical outlet?

Answers

Answer:

In other words, a WiFi bridge can convert Ethernet to WiFi. WiFi bridges can be high-performance and can support more WiFi network types than the T7-Pro can.

Write a test program that prompts the user to enter a two dimensional array and displays the location of the smallest element in the array.

Answers

Answer:

def element_loc():

   is_end = 'n'

   dimen2 = []

   while is_end == 'n':

       par1 = input("Enter rows and columns: ").split(",")

       part = [int(i) for i in par1]

       dimen2. append(part)

       is_end = input("Do you want to add more rows? y/n: ")

   mini = list()

   for i in dimen2:

       mini. append(min(i))

   result = min(mini)

   row_index = mini. index(result)

   col_index = dimen2[row_index]. index(result)

   print("Row: ", row_index, "Col_index: ", col_index)

element_loc()

Explanation:

The python program solution above prompts users for the two-dimensional array and then the rows of the array are compared with the minimum value stored in another list or array. The row index and the column index are gotten from the mini and dimen2 arrays respectively and are displayed as the position of the minimum value in the two-dimensional array.

____________are the video images provided for editor to cut to and from instead of making viewers watch talking heads
Blank 1:

Answers

Answer:

The Scripts

Explanation:

which two pieces of information must be provided when saving a file for the first time in wordpad​

Answers

The name and the saving location.

JAVA...Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
CODE BELOW
public class RecursiveCalls {
public static void backwardsAlphabet(char currLetter) {
if (currLetter == 'a') {
System.out.println(currLetter);
}
else {
System.out.print(currLetter + " ");
backwardsAlphabet(--currLetter);
}
}
public static void main (String [] args) {
char startingLetter;
startingLetter = 'z';
/* Your solution goes here */
}
}

Answers

Answer:

RecursiveCalls.backwardsAlphabet(startingLetter);

Explanation:

The statement that is needed is a single-line statement. Since the class RecursiveCalls is already in the same file we can simply use that class and call its function without making a new class object. Once we call that class' function we simply pass the variable startingLetter (which is already provided) as the sole parameter for the function in order for it to run and use the letter 'z' as the starting point.

       RecursiveCalls.backwardsAlphabet(startingLetter);

There are many different LAN technologies (Wifi, Ethernet, etc) that can be incompatible with each other in terms of how they exchange data. How is it possible then, that any source host can still send information to any destination host when connected in an internet? Explain the two important components of this process.

Answers

Answer:

Explanation:

The two most important parts of this process are simply sending and receiving the data. When a network sends data, the system breaks the data into smaller pieces called Packets. The system then checks if the network that the packets are being sent to exists, if so the packets are sent to that network. When the receiving network's router receives these packets it reconstructs all of the packets received into the final data in the format that the final LAN system can read and sends it to the appropriate device.

What are the advantages and disadvantages of using steganography versus symmetric or asymmetric encryption

Answers

Explanation:

Steganography is a technique used in securing or hiding sensitive information by encrypting the information in a non-hidden file like a JPEG format. A major advantage of this method is that it reduces the risk of attack or break-in since the data is enclosed in a non-secure file; thereby reducing threats of any hack. One main disadvantage of this method is that the hidden message may become difficult to recover if the source file (non-secure file) used, is edited or deleted.

In symmetric or asymmetric encryption they both employ cryptographic encryption method. While symmetric encryption uses one key to encrypt and decrypt data, asymmetric encryption uses two keys (one for encryption, the other for decryption) of the data. A major advantage of using these methods is that they provide more security. Although while symmetric encryption is faster, asymmetric encryption is slower (eg using separate keys to gain access), a disadvantage.

A strategy for concealing critical information as well as ensuring its secure communication everything in non-hidden storage is steganography.

Advantage:

Because the content is contained throughout a non-secure file, the above strategy decreases the chance of an assault on classified info.

Disadvantage:

This approach has the disadvantage that concealed information might be able to retrieve if somehow the documents have been changed or deleted as of a non-secure file.

Once again to encrypt as well as decode information, symmetric encryption employs a unique key, but asymmetric encryption utilizes two different keys, something for encryption as well as someone else for decryption.

Advantage:

One such approach is superior to steganography throughout the level of protection.

Disadvantage:

Because distinct keys have been needed to get access, such techniques of asymmetric encryption are considerably slower.

Thus the approach above is correct.

Learn more about steganography here:

https://brainly.com/question/15187715

Other Questions
which one, explain why? The sum of all chemical reactions in the body is called Plzz answer this question properly step by step how did the different reasons for colonization lead to different levels of governmental presence in the colonies ation in Business organizations5Select the correct answer.Which phrase correctly defines the motives of a business?OA. satisfying the needs of peopleOB. helping a country's economy growOC. incurring expensesOD. earning profits and providing value in the form of goods or services Juanita: _______ compr la semana pasada en este sitio de Web. _____________ comprar otras cosas tambin. Select the boxes in the table to match the beliefs and practices to the religions. Judaism Christianity the Trinity the Ten Commandments worship and prayer Please Help! Please only answer if you have correct answer 2. What, if anything, is the difference between semen and sperm?A. Sperm and semen mean the same thing; they are synonyms of each other.B. Sperm are the actual reproductive cells; semen is the combination of these cells and other secretions from the male reproductive tract.C. Sperm help neutralize acid in the urethra and vagina; semen provides nutrient for sperm.D. Sperm are immature reproductive cells; mature cells are called semen when they leave the epididymis. Help I Have a 54 in science What is the difference between active transport and facilitated diffusion? A business trip will be reimbursed $0.55 per mile. Mr. Jackson has a budget of $70 for the round trip. If he is traveling to a town 61 miles away, then will he be under or over? Prove your thinking. Need help on this one. Which knot is the correct one that would be able to unknot itself What is an example of a paradigm shift that will happen now or in the future? 50 points!!! After World War II, Washington's economy OO continued to show growth. fell into a lengthy depression. remained flat, with little growth. was unaffected by world events. In case of an emergency, the office has a calling list so everyone is called in the least amount of time. Each of the first 4 people on the list calls another 4 people on the list. Then, each of the people in the second group calls another 4 people on the list, and so on. The 4th group of people will make 256 calls. Is this statement accurate? Explain.Select the correct choice and fill in the answer boxes to complete your choice. A.Yes. The 1st group is nothing, the 2nd group is nothing, and so on. The 4th group is which does equal 256.B.No. The 1st group is nothing, the 2nd group is nothing, and so on. The 4th group is which does not equal 256. Which crash caused a greater change in motion for the satellite explains why and how? Write at least 1 paragraph and use vocab. Which of the following BEST explains how the Compromise of 1850 arose out of territorial expansion?A As the Unites States gained territory from Mexico, northerners petitioned to prohibit slavery in all newly acquired territory. B As the United States gained territory from Mexico, slave holders feared their chattel would escape beyond their prescriptive jurisdictions. C As the United States gained territory from Mexico, citizens grew anxious as to whether such territory would embrace or abolish slavery. D As the United States gained territory from Mexico, southerners argued that the sovereignty of the peoples rule should make enslavement decisions. will mark brainliest if correct Robert is risk manager at TPT Bank has been asked to implement an updated badge reader system for addressing access control risk. Even though the risk was migrated, Robert observes some remaining risk linked with access control. What type of risk has been observed by Robert help pls! (it's a pic) I need help with math homework #2 algebra