Observe the following coding in Java --
How many times will "Khoka Babu!!" displayed??
int b=(Byte.MAX_VALUE+(int)Math.abs(Byte.MIN_VALUE)+6);
int r=(byte)b;
boolean t=true;
for(int i=1;t;i++)
{
System.out.println("Khoka Babu!!");
t=i<r--;
} // log on to www.comprogzz.in for such java coding
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
b has the value 127 + |-128| + 6 which will be 5 when truncated to be stored in the byte variable r ... performing the for loop, we will find t is true 3 times (first time, 1 < 5, 2 < 4)