What are the values of a and b after the following function is executed, if the values passed are 30 and 50:
void paws(int a, int b)
{
a=a+b;
b=a–b;
a=a–b;
System.out.println(a+ "," +b);
}
Views 12
Answer:
Value of a is 50 and b is 30.
Output of the code is:
50,30
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.