1.

What will be displayed in jTextField1 after the following code is executed? Also write how many times will the loop execute.a = 5;b = 2;while (b ! = 0)    {     r = a % b;    a = b;    b = r;    }jTextField1.setText ("  " +a);

Answer»

Display in jTextField1; 1

This loop will run 2 times.



Discussion

No Comment Found

Related InterviewSolutions