subject

Write a method named randomx that keeps printing lines, where each line contains a random number of x characters between 5 and 19 inclusive, until it prints a line with 16 or more characters. for example, the output from your method might be the following. notice that the last line has 17 x characters.(because this problem uses random numbers, our test cases check only the general format of your output. you must still examine the output yourself to make sure the answer is correct.) this is what i got, and can not get it to work import java. util.*; public class randomx{ public static void main(string[] args){ randomx(); } publicstaticvoidrandomx(){ randomrand=newrandom(); intlinescount=rand. nextint(9)+2; for(inti=1; i< =linescount; i++){ intxcount=rand. nextint(15)+5; for(intj=1; j< =xcount; j++){ system. out. print("x"); } system. out. println(); } } }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 24.06.2019 11:40
100 pts. first person gets brainliest
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Which best describes the condition under which the unicode output is the same as plain text ?
Answers: 1
question
Computers and Technology, 25.06.2019 00:00
One difference of input method between most desktop computers and most tablets is the memory the touch screen the speech recognition
Answers: 1
You know the right answer?
Write a method named randomx that keeps printing lines, where each line contains a random number of...
Questions
question
History, 26.07.2019 10:10
Questions on the website: 13722360