What will be the output if all necessary code is included (Header files and main function)? [code] void test (Object &y) { y = "It

What will be the output if all necessary code is included (Header files and main function)?
Code:
void test (Object &y)
{
    y = "It is a string";
}
void main()
{
	Object x = null;
	test (x);
	System.out.println (x);
}
A. Run time error
B. Compile time error
C. Null
D. It is a string
 

Tìm kiếm

Back
Top