What does the following program print? public class Mystery { public static void main(String[] args) { int

Question:

What does the following program print?

public class Mystery {

public static void main(String[] args) {

int x = 1;

int total = 0;


                 while (x <= 10) {

int y = x * x;

System.out.println(y);

total += y;

                       ++x;

                 }


                 System.out.printf("Total is %d%n", total);

           }

  

 }


Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java How To Program Early Objects

ISBN: 9780134743356

11th Edition

Authors: Paul Deitel, Harvey Deitel

Question Posted: