-
What is the output of this program?
class calcluation
{
int p;
int q;
void calc(int K , int L)
{
K *= 5;
L /= 5;
}
}
public class result
{
public static void main(String args[])
{
calculation obj = new calculation();
int p = 20;
int q = 40;
obj.calc(p , q);
System.out.println(p + " " + q);
}
}
-
- 10 20
- 20 40
- 30 40
- 40 20
- 20 10
Correct Option: B
Output: 20 40