Single Choice
Moderate
QWhat will be the output of this code
class PostAndPre
{
public static void main( String args[])
{
int a = 2;
int b = a++ - a++;
System.out.println(b);
System.out.println(a);
}
}
ID: #20252
Assignment Operators Java
112 views
Question Info
#20252Q ID
ModerateDifficulty
Assignment Operators JavaTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
class PostAndPre { public static void main( String args[]) { int a = 2; int b = a++ - a++; System.out.println(b); System.out.println(a); } }
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic