A computer science problem by Raj Maiti

Observe the following coding in java and find how many times will "And it's good!" printed when disp(5) --

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
         class r{ 
           public void disp(int a)
          {
          if (a>0);
            {
             System.out.println("And it's good!");
               disp(a-1);
             }
            }
             }

log on to comprogzz.in to learn computer programming:))

×

Problem Loading...

Note Loading...

Set Loading...