This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove NullPointerExceptions in FileDialog


>>>>> "Fernando" == Fernando Nasser <fnasser@redhat.com> writes:

Fernando> If you mistype:
Fernando> g = null
Fernando> you are in serous trouble
Fernando> while if you mistype
Fernando> null = g
Fernando> you get a compiler error.

In Java this problem isn't nearly as serious as it is in C++, because
there is no conversion from a reference type to boolean.  You almost
always just get a compilation error if you make this typo.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]