You are geting the exception because when you call the equals method it is expecting an object as an argument "null" is not an object.
First when you used if (a == null) you were
testing the value of a.
when you used if(b.equals(null)) you were asking if b is pointing to the same object as null ... which is not possible.
This is an example of how the different comparators work on String objects. Remember if you create a String using:
String x = "hello";
Then create another String like this
String y = "hello";
x & y will point to the same String object!
[This message has been edited by Angela Poynton (edited December 13, 2000).]