Write a method called random100 that returns a random integer in the range of 1 to 100 (inclusive).

What will be an ideal response?

public int random100()
{
Random generator = new Random();
return generator.nextInt(100) + 1;
}

Computer Science & Information Technology

You might also like to view...

If you want to unmerge cells you click the Unmerge alignment option

Indicate whether the statement is true or false

Computer Science & Information Technology

Case 1-1 As you prepare to bring one of the interns in your software development company to speed up the project on which you are working, you decide to create some illustrations of your programming to make certain key concepts clear to the intern. Which of the following do you show your intern as an example of an event that a user might perform in the application you are creating?

A. powering on the computer B. saving data to RAM C. clicking a button D. all of the above

Computer Science & Information Technology