Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 (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
Step: 1
The three lines of code import random Create a Random objec...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started