Explanatory Question
(v) Consider the following Java program and determine its output:
class report
{
int a, b;
report()
{
a = 10;
b = 15;
}
report(int x, int y)
{
a = x;
b = y;
}
void print()
{
System.out.println(a * b);
}
public static void main(String[] args)
{
report r = new report();
r.print();
report p = new report(4, 5);
p.print();
}
}
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.