1. Program
//What will be the O/P ?
class A
{
public static void main(String args[])
{
int i = 0;
System.out.println(i++);
System.out.println(i);
}
}
2. Program
//What will be the O/P ?
class B
{
public static void main(String args[])
{
int i = 0;
System.out.println(i--);
System.out.println(i);
}
}
3. Program
//What will be the O/P ?
class C
{
public static void main(String args[])
{
int i = 0;
int j = i++;
System.out.println(i);
System.out.println(j);
}
}
4. Program
//What will be the O/P ?
class D
{
public static void main(String args[])
{
int i = 0;
int j = i--;
System.out.println(i);
System.out.println(j);
}
}
5. Program
//What will be the O/P ?
class E
{
public static void main(String args[])
{
int i = 0;
int j = i++ + i;
System.out.println(i);
System.out.println(j);
}
}
6. Program
//What will be the O/P ?
class F
{
public static void main(String args[])
{
int i = 0;
int j = i++ + i + i++ + i;
System.out.println(i);
System.out.println(j);
}
}
Page....