Java help

hoc34

The code below is supposed to print "Hello World" however many times the user tells it to. Does it work correctly? If not, how would you fix it?

 
System.out.print("How many times should I print it? ");
int times = reader.nextInt();
 
for( int i=1; i<times; i++ ){
   System.out.println("Hello World!);
}
    • 11 years ago
    • 3
    Answer(3)

    Purchase the answer to view it

    NOT RATED

      Purchase the answer to view it

      NOT RATED
      • java_problem.docx

      Purchase the answer to view it

      NOT RATED
        Bids(0)