Java
T
point
Home
Python
Java
JavaScript
HTML
SQL
PHP
C#
C++
DS
Aptitude
Reasoning
Selenium
DBMS
C
Android
Interview Q
Content Menu ▼
1
2
3
4
5
6
7
8
9
10
Question 1
:
public class Spock {
public static void main(String[] args) {
Long tail = 2000L;
Long distance = 1999L;
Long story = 1000L;
if((tail > distance) ^ ((story * 2) == tail))
System.out.print("1");
if((distance + 1 != tail) ^ ((story * 2) == distance))
System.out.print("2");
}
}
What is the result?
1.
1
2.
2
3.
12
4.
No output is produced.