1) If i define a java method:
void ChangeObject (Object o)
{
o = new Object();
}
And in my main program, i instantiate an object o and call ChangeObject with o passed in. Will o remain intact after this method is run?
2) If i have two class: Child and Parent. And child is a subclass of parent. Which of these two statements will compile, and why:
Child myChild = new Parent();
Parent myParent = new Child();