44. What will be the output of the following code?
class Dum
{
private int f = 5;
public void setF(int f)
{
this.f = f;
}
public int getF()
{
return f;
}
}
public class Test{
public static void change(Dum d)
{
d.setF(4581);
}
public static void main(String args[]){
Dum dd = new Dum();
System.out.print(dd.getF() + " ");
change(dd);
System.out.println(dd.getF());
}
}
Select 1 correct answer:
A. 5 5
B. The code will not compile.
C. Runtime exception will be thrown.
D. 5 4581