Question: Write three lines of code, one that creates a Random object, a second that assigns a random 3-digit integer (ie, 100..999) to int x,

Write three lines of code, one that creates a Random object, a second that assigns a random 3-digit integer 

Write three lines of code, one that creates a Random object, a second that assigns a random 3-digit integer (ie, 100..999) to int x, and a third that assigns a random double in the range 100..999 to double y. 2) (3 Pts) Write a static method dup2D that duplicates and returns a 2D array of int. You may assume there is at least one row and column and that each row of the array is the same length. 3) (3 Pts) Write a static method delFifths that takes a String as a parameter and returns the same string but with every fifth character deleted (ie, delete at index 4, 9, 14, etc). So, "Hello world!" would become "Hell word!". Do not use charAt. Note: in a for-loop you may write 1+-5 instead of 1++ to increment 5 at a time.

Step by Step Solution

3.41 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The three lines of code import random Create a Random objec... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!