What is the easiest way to get the answer for the following code??? Since we�ll be short of time , how is it best to work out this problem and find the result values? write on paper or???
class Testjranch
{
public static void main(String args[ ] )
{
int k = 0;
int m = 0;
for ( int i = 0; i <= 3; i++)
{
k++;
System.out.println( k + " k after k++, " + m );
if ( i == 2)
{
continue;
}
m++;
System.out.println( k + " m after m++," + m );
}
System.out.println( k + " outside for loop, " + m );
}
}
class Testjranch
{
public static void main(String args[ ] )
{
int k = 0;
int m = 0;
for ( int i = 0; i <= 3; i++)
{
k++;
System.out.println( k + " k after k++, " + m );
if ( i == 2)
{
continue;
}
m++;
System.out.println( k + " m after m++," + m );
}
System.out.println( k + " outside for loop, " + m );
}
}