What will be the output of the following code ?
int m=2
int n =15
for (int I =1 ; i<5 ; i++)
m++;
--n;
Answers
Answered by
2
Explanation:
/**
*
*/
public class peck
{
/**
*
*/
static public void main(String[] args)
{
int m=2;
int n=15;
for(int i=1;i<5;i++)
m++;--n;
System.out.println("m= "+m);
System.out.println("n= "+n);
}
}
out put
is m= 6 n= 14
Similar questions