Question: Java how would I make this output negative numbers as well constant is -20 System.out.println(My random number in range is + Firstnum +

Java how would I make this output negative numbers as well constant is -20

System.out.println("My random number in range is " + Firstnum + " to " + Secondnum + " is " + Random1 + "."); Random2 = generator.nextInt((Random1 - Constant + 1) + Constant); System.out.println("My random number in range is " + Constant + " to " + Random1 + " is " + Random2 + ".");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!