Part 1

What Will be the Output Of These following given Programs.

public class Test1 {


public static void main(String[] args) {

System.out.println(5+2);
System.out.println(25-80);
System.out.println(10*23);
System.out.println(50/80);

}
}

Output :  ?????

-------------------------------------------------------------------------------------------------------

public class Test2 {


public static void main(String[] args) {
int i;
System.out.println(i=8);
    }
}

Output : ??????????????
------------------------------------------------------------------------------------------------------------

public class Test3  {


public static void main(String[] args) {

System.out.println(40==40);
System.out.println(40!=40);
System.out.println(true!=false);
System.out.println(20!=200);
}
}

Output : ??????????


-------------------------------------------------------------------------------------------------------------------


public class Test4 {


public static void main(String[] args) {

int i=10;

System.out.println(i++ );
System.out.println(i);
}
}

Output : ????????????????

-------------------------------------------------------------------------------------------------------------------


public class Test5 {


public static void main(String[] args) {

int i=10;
int k=i++;
int j=++i;

System.out.println(i );
System.out.println(j);
System.out.println(k);
}
}

Output : ????????????????


---------------------------------------------------------------------------------------------------------------------

public class Test6 {


public static void main(String[] args) {

int i=10;
int k=i--;
int j=++i;

System.out.println(i );
System.out.println(j);
System.out.println(k);
}
}

Output : ????????????????

-----------------------------------------------------------------------------------------------------------------------


public class Test7 {


public static void main(String[] args) {

int i=10;
int k=++i;
int j=i++;

System.out.println(i );
System.out.println(j);
System.out.println(k);
}
}

Output : ????????????????

-------------------------------------------------------------------------------------------------------------

public class Test8 {


public static void main(String[] args) {

int i=10;
int k=i--;
int j=--i;

System.out.println(i );
System.out.println(j);
System.out.println(k);
}
}

Output : ????????????????

------------------------------------------------------------------------------------------------------------------

public class Test9 {


public static void main(String[] args) {

int i=0;
int j=i++ + i;

System.out.println(i );
System.out.println(j);
}
}

Output : ????????????????

------------------------------------------------------------------------------------------------------------------

public class Test10 {


public static void main(String[] args) {

int i=0;
int j=i++ +i++ + i;

System.out.println(i );
System.out.println(j);
}
}

Output : ????????????????

------------------------------------------------------------------------------------------------------------------

public class Test11 {


public static void main(String[] args) {

int i=0;
int j=i -i-- +i++ + i;

System.out.println(i );
System.out.println(j);
}
}

Output : ????????????????

------------------------------------------------------------------------------------------------------------------



0 comments:

Post a Comment