0 votes
in JAVA by

 What is the output of the following code snippet?

python

Copy code

int x = 5;

int y = 2

go

System.out.println(x / y);

A) 2.5

B) 2

C) 2.0

D) Error

1 Answer

0 votes
by
Answer: B

Explanation: Integer division in Java always returns an integer. Therefore, the result of x / y is B)
...