The ^ character is for bitwise-exclusive-or (xor). This will not help you much. But the logical ^^ version might.
I would like to note that "making the code shorter" isn't always a good thing. True, it's fun for code golf, or for things that actually save you development time, but in this case you're not being productive. I would suggest ignoring the bonus because it's not usefull, unless you have extra time on your hands.
In fact, the very first thing my eye's saw when I looked at it was how to make it faster dispite lengthening the code. Making it faster would be a much more usefull bonus question in my opinion. Who knows, maybe you can explain him the same thing and show much much faster your version is and get the bonus anyways. (I initially saw 3 ways you can improve performance).
But ok, if you want to play code golf, then code golf it is. Consider the following: Say a function always returns a boolean. Say the return statements are nested within an if-statement. Then, my question to you is, are the if statements nessacary?
i should have also stated that this is a practice it question (awsome site btw) so there are guidelines the code has to follow the if statement helps handel three parts in one statement ie if both are null return true if one is null but other is not return false ad vice versa
this is what ive come up with but i am not sure if it teststhe same logic as the previouse snippet of code when the program is passed a single null tree will this return false or will it send a null pointer value exception pactice it does not test for this case